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

Emit warning about class literal incompatibility

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 6
    • 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?

            jjg Jonathan Gibbons
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: