Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Edwin Stang (subes)
>Assigned to: Oleg Sukhodolsky (o_sukhodolsky)
Summary: IllegalTokenText does not match anything besides .* format
I cannot get the IllegalTokenText to match any format besides .* on PARAMETERS or PARAMETER_DEF.
<property name="tokens" value="PARAMETER_DEF"/>
<property name="format" value="@NotNull"/>
<property name="message" value="Use @Nonnull instead of @NotNull on parameters."/>
The format ".*" matches the whole paramter definition "@NotNull final String args". But trying to match anything else fails miserably.
The format ".*[a-zA-Z].*" correctly matches everything, but somehow the format "a" does that aswell, even if I remove all a-literals from the paramters text. And then again the format "o" does not match anything...
This is because IllegalTokenText checks against the string "PARAMETER_DEF"
instead of "@NotNull final String args" as I expected. Maybe this should
be made more clear in the documentation. Or the check could be enhanced to
do just that. :)