Oliver Heger wrote:
The lazy initialization holder class idiom only applies for static fields of a class. The LazyInitializer class uses the double-check idiom and is intended for lazy initialization of instance fields. So there may be different use cases for it.

Maybe this fact can be better emphasized in the documentation and/or the class name?

The javadoc should have an example of the static field pattern too, as that is more appropriate for singleton initialisation.

I'm still not sure that this class justifies its place in [lang] though. It feels like something where inline code (from good online docs) is a better solution.

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to