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

Regression in wording of unchecked warning message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • tools
    • None
    • b105
    • generic
    • windows_xp
    • Verified

    Description

      Compile this program with -Xlint:unchecked
      import java.util.*;
      class mc {
          public static void quicksort(Vector vector, Comparator compare)
          {
              Collections.sort(vector,compare);
          }
      }

      jdk8b42 javac outputs this warning (among others):
      mc.java:5: warning: [unchecked] unchecked conversion
              Collections.sort(vector,compare);
                               ^
        required: List<T>
        found: Vector
        where T is a type-variable:

      jdk8b43 javac outputs this warning which is less accurate:
      mc.java:5: warning: [unchecked] unchecked conversion
              Collections.sort(vector,compare);
                               ^
        required: List<Object>
        found: Vector

      Attachments

        Activity

          People

            kizune Alexander Zuev
            jjh James Holmlund (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: