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

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

    Details

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

      Backports

        Description

        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/

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: