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

(reflect) Class.get{Declared}Method{s} does not return clone() for array types

    XMLWordPrintable

Details

    • b108
    • generic
    • generic, solaris_8
    • Verified

    Description

      From jdn@sfbay:

      Since 1.2 we apparently also return Cloneable and Serializable
      if getInterfaces() is called on an array. This is documented
      explicitly in the new 1.5 getGenericInterfaces() but is ignored
      by the documentation for getInterfaces().

      If we have come this far in supporting reflection on arrays
      then we should probably go ahead and fix the only remaining
      inconsistency that I know of and have getMethods(), getMethod(String),
      getDeclaredMethods() and getDeclaredMethod(String) return a public
      overridden clone() method as per the JVMS 2nd Edition section 2.15.
      This will then make reflection on arrays fully consistent with their
      bytecode execution behavior.

      Attachments

        Issue Links

          Activity

            People

              jfranck Joel Borggrén-Franck (Inactive)
              iris Iris Clark
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: