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

Javac Should Generate Warnings For Raw Array Type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • tools
    • b110
    • Verified

      Javac does not generate warnings for the following test case which uses raw types.

      //Main.java

      import java.util.*;

      public class Main {
          public static final Class[] TEST_CLASS = new Class<?>[16];
          public static final List[] TEST_MAP = new ArrayList<?>[16];
      }

      After compiling with javac -Xlint:all Main.java, no warnings are printed out.

            jlahoda Jan Lahoda
            dxu Dan Xu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: