Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8063147

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • None
    • 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/

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

                Created:
                Updated:
                Resolved: