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

Tiger javac could generate better warnings for annotation use in 1.4 source

XMLWordPrintable

    • b49
    • generic
    • generic

      Annotations are a new language feature in Tiger available when using "-source 1.5". The annotation syntax uses an at sign, "@", which didn't often appear in Java source previously. In Tiger javac defaults to "source 1.4" so annotations cannot be used. However, the current javac error for using annotations in source 1.4 code is somewhat cryptic; e.g.

      StaticFieldAnnotations.java:5: illegal character: \64
          @MySimple("value") @MyMarker
          ^
      This error message could be enhanced to mention annotations and source 1.5.

            gafter Neal Gafter (Inactive)
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: