I am debugging the serializable and restoreable nature of wicket and there are things that must be fixed (which i am doing right now) But one thing i wanted to give as an example here

FormComponent has a member:

protected static final String NO_INVALID_INPUT = "[No invalid input]";

and that member is copied into:

private String invalidInput = NO_INVALID_INPUT;

and that one is used in getValue() again:

   public final String getValue()
   {
return invalidInput == NO_INVALID_INPUT ? getModelValue() : invalidInput;
   }


now looking at this you could think that can never go wrong...
because it is a static final string.. that you compare so invalidInput has another value or that instance.

But now a form component is serialized to disk. And read back in with a server or context restart or what ever the servlet container does.

But now invalidInput is not the same anymore then its static final string...

If anybody sees more of these places where static finals are references also by non transient fields please let me know.

johan



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to