You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Johan Compagner <jc...@gmail.com> on 2007/07/16 22:49:12 UTC

Re: [jira] Created: (WICKET-756) FormComponent.getValue uses equals instead of == to compare NO_RAW_INPUT

which places are using == or !=? because those places are wrong, even
static final strings must be compared with equals because the value
that you compare it with could be serialized and then deserialaized.

On 7/15/07, Willis Boyce (JIRA) <ji...@apache.org> wrote:
> FormComponent.getValue uses equals instead of == to compare NO_RAW_INPUT
> ------------------------------------------------------------------------
>
>                  Key: WICKET-756
>                  URL: https://issues.apache.org/jira/browse/WICKET-756
>              Project: Wicket
>           Issue Type: Bug
>           Components: wicket
>     Affects Versions: 1.2.6
>             Reporter: Willis Boyce
>
>
> It looks like the "no raw input" condition is identified by the rawInput
> member actually referencing the NO_RAW_INPUT constant, not having the same
> string as NO_RAW_INPUT ("[-NO-RAW-INPUT-]").  Twice the code uses == or !=
> to compare rawInput to NO_RAW_INPUT.  But once it uses the equals method
> instead.  This is probably wrong;  it should use ==.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>