Class.getFields spec should state that fields are inherited from superinterfaces

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: None
    • Component/s: core-libs

        Spec of Class.getFields should be amended as follows:


        diff --git a/src/java.base/share/classes/java/lang/Class.java b/src/java.base/share/classes/java/lang/Class.java
        --- a/src/java.base/share/classes/java/lang/Class.java
        +++ b/src/java.base/share/classes/java/lang/Class.java
        @@ -1533,7 +1533,8 @@
              * 0.
              *
              * <p> If this {@code Class} object represents a class, then this method
        - * returns the public fields of the class and of all its superclasses.
        + * returns the public fields of the class and of all its superclasses and
        + * superinterfaces.
              *
              * <p> If this {@code Class} object represents an interface, then this
              * method returns the fields of the interface and of all its

        Webrev: http://cr.openjdk.java.net/~martin/webrevs/openjdk9/Class-getFields-spec/

              Assignee:
              Martin Buchholz
              Reporter:
              Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: