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

API for Class::permittedSubclasses should clarify if returned elements are ordered or not

    Details

    • Subcomponent:
    • Resolved In Build:
      b28

      Backports

        Description

        Currently

        java.lang.Class
        public ClassDesc[] permittedSubclasses()
        says just
        "Returns an array containing ClassDesc objects representing all the permitted subclasses of this Class if it is sealed. Returns an empty array if this Class is not sealed."

        It would be very beneficial to mention if the order of the returned elements is expected to correspond to the declaration order (experiments show that for OpenJDK now it does conform to the declaration order) or there is no guarantee and no one should expect any particular order of elements in the returned array.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vromero Vicente Arturo Romero Zaldivar
                  Reporter:
                  dbessono Dmitry Bessonov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: