On Mon, Feb 16, 2004 at 10:14:43PM +0100, Sylvain Wallez wrote:
> Tim Larson wrote:
>
> >I would like to make the WidgetDefinition objects be "static final", so
[Note: This should have read: "private final".]
> >the compiler can help us respect the definitions by preventing us from
> >changing them in ways that are not thread-safe.
>
> Uh? Can you elaborate on why some definitions could be not thread-safe?
> AFAIK, once configured, the widget definitions serve only as factories.
Example definition which sports a non-thread-safe method:
formmodel/FieldDefinition.java:
private boolean required;
public void setRequired(boolean required);
For more examples like this, just look for more setSomething
methods in the widget definition classes.
We are careful when we call these set* methods so we have not had
problems, but wouldn't it be nice to let the language help document
and enforce the "configure once, use as a factory thereafter" model?
--Tim Larson