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

Overhaul compiler diagnostics

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      There are many compiler diagnostics that could be improved.
      This RFE tracks all such issues. Please either add a new
      description note or link to related issues.
      From jplan entry 403:

      For an invalid cast, javac will write something like:

      Cast.java:1: inconvertible types
      found : java.lang.Number
      required: java.lang.String
      See also: http://blogs.sun.com/ahe?entry=diagnosing_captured_wildcards
      Object o = null;
              o -= null;

      Gives:

      Test.java:12: operator - cannot be applied to java.lang.Object,<nulltype>
              o -= null;
                ^

      This should be improved. This should not refer to the operator -, but
      the operator -=. Furthermore, "java.lang.Object,<nulltype>" is not very
      helpful and we should have separate error messages for unary and binary
      operators.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                ahe Peter Ahe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: