Emit warning about class literal incompatibility

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P3
    • None
    • Affects Version/s: 6
    • Component/s: tools
    • generic
    • generic

      When using -target 5 or newer, javac generates code that affects class
      initialization of class literals differently than older targets:

        http://java.sun.com/j2se/1.5.0/compatibility.html#literal

      Unfortunately, many developers are unaware of the information provided
      in this page and some assistance from the compiler could be useful.

      The compiler should emit a warning about the situation. It is not
      immediately apparent how this should be integrated with the existing
      -Xlint feature. Should this be turned on with -Xlint:all?

            Assignee:
            Jonathan Gibbons
            Reporter:
            Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: