accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Newton <eric.new...@gmail.com>
Subject Re: Should SiteConfiguration getInstance be sychronized?
Date Sat, 08 Sep 2012 16:14:05 GMT
Yes, it should be synchronized, though it's harmless if it is initialized
multiple times.

On Sat, Sep 8, 2012 at 8:51 AM, David Medinets <david.medinets@gmail.com>wrote:

> Findbugs is warning (Incorrect lazy initialization and update of
> static field) about the following code:
>
>   public static SiteConfiguration getInstance(AccumuloConfiguration
> parent) {
>     if (instance == null) {
>       instance = new SiteConfiguration(parent);
>       ConfigSanityCheck.validate(instance);
>     }
>     return instance;
>   }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message