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

(reflect) retrofit Array.newInstance by using generics

XMLWordPrintable

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

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: