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

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

XMLWordPrintable

    • b28

        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.

              vromero Vicente Arturo Romero Zaldivar
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: