commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <>
Subject Re: [lang] LazyInitializer
Date Sun, 25 Oct 2009 18:33:20 GMT
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message