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

(reflect) retrofit Array.newInstance by using generics

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • None
    • 5.0
    • core-libs
    • None

    Description

      I think the following signature:

          public static <T> T[] Array.newInstance(Class<T> componentType, int length)

      is more type safe than the current one:

          public static Object Array.newInstance(Class<?> componentType, int length)

      Is there any reason we can't do this?
      ###@###.### 2004-09-14

      Attachments

        Issue Links

          Activity

            People

              ahe Peter Ahe
              kkawagucsunw Kohsuke Kawaguchi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: