Just because generated code is not thread safe, that doesn't mean it shouldn't be generated. If a person doesn't know enough to synchronize the correct parts of their code then they shouldn't be programming java at all; the ide should not be shielding design complexity from them or allowing them not to have to think about it.
Paul Ruane wrote:
> This should not happen by default as it's not thread-safe.
>
>
>
>
>
>
> Nathan Brown
>
>
> <[EMAIL PROTECTED]> To:
>[EMAIL PROTECTED]
>
> Sent by: cc:
>
>
> [EMAIL PROTECTED] Subject: [Eap-features]
>Add lazy initialization to the "Encapsulate fields" refactoring
>
> tbrains.com
>
>
>
>
>
>
>
>
> 25/06/2002 18:41
>
>
> Please respond to
>
>
> eap-features
>
>
>
>
>
>
>
>
>
>
>
>
> It would be great if the "Encapsulate fields" refactoring could also
> support lazy initialization when an initialization statement exists at
> the field declaration and the field is of an object type.
>
> Using this option, the existing initialization would be moved into the
> get method so that :
>
> private Object _value = new ExpensiveObject();
>
> would be transformed to
>
> private Object _value;
>
> public Object getValue()
> {
> if (_value == null) {
> _value = new ExpensiveObject();
> }
> return value;
> }
>
> N.
>
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://lists.jetbrains.com/mailman/listinfo/eap-features
>
>
>
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you are not
>the intended recipient (or have received this e-mail in error) please notify the
>sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or
>distribution of the material in this e-mail is strictly forbidden.
>
>
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features
