Reports Double Brace Initialization. Double brace initialization can cause memory leaks when used from a non-static context, because the anonymous class created will maintain a reference to the surrounding object. It has worse performance than regular initialization because of the additional class loading required. It can cause equals() comparisons to fail, if the equals() method does not accept subclasses as parameter (see link above). And finally, pre Java 9 it cannot be combined with the diamond operator, because that cannot be used with anonymous classes.