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

(reflect) retrofit Array.newInstance by using generics

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: