improve diagnostics for generic array warnings.

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: tools
    • generic
    • generic

      I came across a problem where compiler suggested use is an
      error. In gerneric array example I used the required
      suggestion and I got an generic array creation error.
      I discussed this problem with Peter. He suggested me
      to file RFE to improve diagnostics.

      Ex:

      ../../../src/share/classes/com/sun/tools/jdi/LinkedHashMap.java:286:
      warning: [unchecked] unchecked conversion
      found : com.sun.tools.jdi.LinkedHashMap.Entry[]
      required: com.sun.tools.jdi.LinkedHashMap.Entry<K,V>[]
                Entry<K,V> newMap[] = new Entry[newCapacity];

       ../../../src/share/classes/com/sun/tools/jdi/LinkedHashMap.java:147:
       generic array creation
                table = new Entry<K,V>[initialCapacity];

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Swamy Venkataramanappa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: