You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2007/08/22 12:04:30 UTC
[jira] Commented: (WICKET-756) FormComponent.getValue uses equals
instead of == to compare NO_RAW_INPUT
[ https://issues.apache.org/jira/browse/WICKET-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521749 ]
Johan Compagner commented on WICKET-756:
----------------------------------------
I will revert the change for equals to == and make sure that we use equals everywhere for that.
Yes it is a final constant. But the raw input value is also serialized and then deserialized. Then == will fail!
Be very careful with that try to use equals also for those kind of constants!!!
> 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
> Assignee: Jean-Baptiste Quenot
> Priority: Trivial
> Fix For: 1.3.0-beta4
>
>
> 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.