Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b11
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045151 | 8u25 | Jan Lahoda | P3 | Resolved | Fixed | b01 |
JDK-8040934 | 8u20 | Jan Lahoda | P3 | Resolved | Fixed | b13 |
JDK-8052590 | emb-8u26 | Jan Lahoda | P3 | Resolved | Fixed | b17 |
Description
Consider these examples with the specified incorrect behavior of javac:
---
public class Foo {
<T> @DA Foo() { } //should be rejected, is accepted
<T> @TA Foo(int i) { } //should be rejected, is accepted
public <T> @DA int foo1() { return 0;}
public <T> @DA void foo2() { } //should be accepted, is rejected
public <T> @TA int foo3() { return 0;}
public <T> @TA void foo4() { } //correctly rejected, but with suboptimal error message
}
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
@interface DA { }
@Target(ElementType.TYPE_USE)
@interface TA { }
---
This is with:
$ javac -fullversion
javac full version "1.8.0-b132"
See:
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2014-March/001678.html
for more details.
---
public class Foo {
<T> @DA Foo() { } //should be rejected, is accepted
<T> @TA Foo(int i) { } //should be rejected, is accepted
public <T> @DA int foo1() { return 0;}
public <T> @DA void foo2() { } //should be accepted, is rejected
public <T> @TA int foo3() { return 0;}
public <T> @TA void foo4() { } //correctly rejected, but with suboptimal error message
}
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
@interface DA { }
@Target(ElementType.TYPE_USE)
@interface TA { }
---
This is with:
$ javac -fullversion
javac full version "1.8.0-b132"
See:
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2014-March/001678.html
for more details.
Attachments
Issue Links
- backported by
-
JDK-8040934 javac behaves incorrectly for annotations after method type parameters in some cases
- Resolved
-
JDK-8045151 javac behaves incorrectly for annotations after method type parameters in some cases
- Resolved
-
JDK-8052590 javac behaves incorrectly for annotations after method type parameters in some cases
- Resolved