Don't be opinionated about whether anonymous classes can be static.

ReflectionTest was asserting that the anonymous class from:
private static final Object staticAnonymous = new Object() {};
is itself static, which matches the behavior of OpenJDK 8
(currently used by default in the Android toolchain).

OpenJDK 9b08 onwards adopted the behavior of not considering the
anonymous class static.

Only the new behavior is consistent with the specification
("An anonymous class is [...] never static") in JLS 15.9.5.

This CL makes the test accept either behavior.

Bug: 62290080
Test: Treehugger

Change-Id: I05b14290867bf977e5ebbf54bfd9c3f7397947c3
1 file changed