Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136276 | emb-9 | Maurizio Cimadamore | P3 | Resolved | Fixed | team |
Let's consider the code below.
Foo.java:
package Test10pkg;
public class Foo {
public static <T extends Integer> void foo(T a1){}
}
Test10.java:
import Test10pkg.Foo;
public class Test10 {
public static void test() {
Foo.foo(10);
}
}
Compilation results in following error:
Error:(5, 17) java: valueOf(int) in java.lang.Integer is defined in an inaccessible class or interface
This is reproduced on JDK9b69.
Foo.java:
package Test10pkg;
public class Foo {
public static <T extends Integer> void foo(T a1){}
}
Test10.java:
import Test10pkg.Foo;
public class Test10 {
public static void test() {
Foo.foo(10);
}
}
Compilation results in following error:
Error:(5, 17) java: valueOf(int) in java.lang.Integer is defined in an inaccessible class or interface
This is reproduced on JDK9b69.
- backported by
-
JDK-8136276 Access error when unboxing a primitive whose target is a type-variable in a different package
-
- Resolved
-