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

REGRESSION: -nowarn will not suppress warnings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 6
    • 6
    • tools
    • 6
    • generic
    • generic

      REGRESSION: -nowarn will not suppress warnings
      <code>
      import java.util.ArrayList;
      import java.util.List;

      public class Foo {
          public static void main(String[] args) throws Throwable {
              List<String> list = new ArrayList();
          }
      }
      </code>
      Output with b79
      <output>
      bash-3.00$ javac -Xlint -nowarn Foo.java
      Foo.java:6: warning: [unchecked] unchecked conversion
      found : java.util.ArrayList
      required: java.util.List<java.lang.String>
              List<String> list = new ArrayList();
                                  ^
      1 warning
      bash-3.00$ javac -version
      javac 1.6.0-beta2
      bash-3.00$ java -version
      java version "1.6.0-beta2"
      Java(TM) SE Runtime Environment (build 1.6.0-beta2-b79)
      Java HotSpot(TM) Client VM (build 1.6.0-beta2-b79, mixed mode)
      </output>

      Output with Tiget
      <output-tiger>
      bash-3.00$ /net/sqindia/export/disk09/jdk/1.5.0/rc/b63/binaries/solsparc/bin/javac -Xlint -nowarn Foo.java
      bash-3.00$ /net/sqindia/export/disk09/jdk/1.5.0/rc/b63/binaries/solsparc/bin/java -version
      java version "1.5.0-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
      Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)
      </output-tiger>

      With tiger build generates no warnings.

            jjg Jonathan Gibbons
            savadhansunw Seetharama Avadhanam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: