<p>
Non-static initializers are rarely used, and can be confusing for most developers.
When possible, they should be refactored into standard constructors or field initializers.
</p>

<p>The following code:</p>

<pre>
class MyClass {
  private static final Map<String, String> MY_MAP = new HashMap<String, String>() {

    // Non-Compliant - HashMap should be extended only to add behavior, not for initialization
    {
      put("a", "b");
    }

  };
}
</pre>

<p>could be refactored using Guava into:</p>

<pre>
class MyClass {
  // Compliant
  private static final Map<String, String> MY_MAP = ImmutableMap.of("a", "b");
}
</pre>