The behavior of the javax.swing.SwingContainer.delegate contradicts spec

XMLWordPrintable

        The spec for javax.swing.SwingContainer.delegate:

        http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/SwingContainer.html

        asserts that delegate:

        "Returns:
        the name of the getter method in the annotated class, which returns the corresponding Swing container, or an empty string if the method name is not set."

        but in the case of the following annotated class:

        @SwingContainer()
        class T {
        }

        BeanInfo info2 = Introspector.getBeanInfo(T.class);
        BeanDescriptor bd2 = info2.getBeanDescriptor();
        Optional.ofNullable(bd2.getValue("containerDelegate")).ifPresent(System.out::print);

        null instead of empty string appears.
        Please find attached Test.java for more details.

        Due to this issue the following test will fail after integration:
        api/javax_swing/SwingContainer/index.html#SwingContainer

              Assignee:
              Sergey Bylokhov
              Reporter:
              Olga Strizhenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: