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

Emit warning about class literal incompatibility

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P3
    • None
    • 6
    • tools
    • generic
    • generic

    Description

      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?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: