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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: