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

Error message should be generated once when -source 6 is specified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • tools
    • b133
    • Verified

      During work for JDK-8074387 for creation of golden files for negative tests, it was discovered that multiple error messages were generated when -source 6 was specified when compiling a test using JDK7 feature: strings in switch.

      Test:tools/javac/StringsInSwitch/OneCaseSwitches.java

      - compiler.warn.source.no.bootclasspath: 1.6
      - compiler.warn.option.obsolete.source: 1.6
      - compiler.warn.option.obsolete.suppression
      OneCaseSwitches.java:23:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:33:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:52:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:66:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:85:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:99:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:119:15: compiler.err.string.switch.not.supported.in.source: 1.6
      OneCaseSwitches.java:130:15: compiler.err.string.switch.not.supported.in.source: 1.6
      neCaseSwitches.java:242:16: compiler.err.string.switch.not.supported.in.source: 1.6
      9 errors
      3 warnings

            jlahoda Jan Lahoda
            sogoel Sonali Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: