Not sure if that's a bug, but looking at JDK-8130937: what is the expected result for "C": "false" or "null"?
import java.beans.IntrospectionException;
import java.beans.Introspector;
import javax.swing.SwingContainer;
public class SwingContainerTest {
@SwingContainer
public class A {}
@SwingContainer(false)
public class B {}
public class C {}
static void test(Class<?> c) throws IntrospectionException {
System.out.println(c.getSimpleName() + ": " +
Introspector.getBeanInfo(c, Object.class).getBeanDescriptor().getValue("isContainer"));
}
public static void main(String[] args) throws IntrospectionException {
test(A.class);
test(B.class);
test(C.class);
}
}
Output (JDK9 b72, Win 7):
A: true
B: false
C: null