title: Static non-final variable used during initialization
body: <p>See this incomplete code fragment:</p>
  
  <pre><code>public class Singleton implements Serializable {
  
      private static class SingletonHolder {
  
          private static final Singleton SINGLETON_INSTANCE;
  
          static {
              Singleton tmp = singletonTMP;
              if (tmp != null) {
                  SINGLETON_INSTANCE = tmp;
              } else {
                  // etc.
              }
          }
      }
  
      private static volatile Singleton singletonTMP;
  
      // etc.
  
  }
  </code></pre>
  
  <p>I get a strange warning in NetBeans at line <code>Singleton tmp = singletonTMP;</code>: "Usage of static non-final variable used during initialization".</p>
  
  <p>So, yes. This is true, of course, but why would this be a problem?</p>