(Distilled from report by Victor.Rudometov@oracle.com in compiler-dev@openjdk.java.net)
Given the following program:
public class X {
public void method() throws @Annot SomeException {}
}
JDK 9b70 has started issuing messages of the form:
X.java:2: error: cannot find symbol
public void method() throws @Annot SomeException {}
^
symbol: class Annot
location: class X
X.java:2: error: scoping construct cannot be annotated with type-use annotation: Annot
public void method() throws @Annot SomeException {}
^
2 errors
The second error message is bogus - happens because internally we are classifying SomeException
as a package name inadvertently. So the second error does not qualify as a recoverable (resolution
related error) and so annotation processing round is skipped.
Given the following program:
public class X {
public void method() throws @Annot SomeException {}
}
JDK 9b70 has started issuing messages of the form:
X.java:2: error: cannot find symbol
public void method() throws @Annot SomeException {}
^
symbol: class Annot
location: class X
X.java:2: error: scoping construct cannot be annotated with type-use annotation: Annot
public void method() throws @Annot SomeException {}
^
2 errors
The second error message is bogus - happens because internally we are classifying SomeException
as a package name inadvertently. So the second error does not qualify as a recoverable (resolution
related error) and so annotation processing round is skipped.
- relates to
-
JDK-8074346 type annotation on a qualified type causes spurious 'cannot find symbol' errors
- Closed