Examples of errors detected by the V6050 diagnostic

V6050. Class initialization cycle is present.


Huawei Cloud

V6050 Class initialization cycle is present. Initialization of 'INSTANCE' appears before the initialization of 'LOG'. UntrustedSSL.java(32), UntrustedSSL.java(59), UntrustedSSL.java(33)


public class UntrustedSSL {

  private static final UntrustedSSL INSTANCE = new UntrustedSSL();
  private static final Logger LOG = LoggerFactory.getLogger(UntrustedSSL.class);
  ....
  private UntrustedSSL()
  {
    try
    {
      ....
    }
    catch (Throwable t) {
      LOG.error(t.getMessage(), t);           // <=
    }
  }
}


Bugs Found

Checked Projects
377
Collected Errors
13 692