Details
-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0, 1.4.0
-
beta
-
generic, sparc
-
solaris_7, solaris_8
-
Verified
Description
frog$ cat -n Q2.java
1 class AS {
2 protected String o() { return "aso"; }
3 }
4
5 public class Q2 {
6 public class A extends AS {
7 class Inner {
8 void test() {
9 A.super.o();
10 }
11 }
12 A() {
13 Inner i = new Inner();
14 i.test();
15 }
16 }
17
18 public static void main(String[] args) {
19 A a = new Q2().new A();
20 }
21 }
frog$ javac1.4 -target 1.2 Q2.java
+ /usr/local/java/jdk1.4.0/solsparc/bin/javac -target 1.2 Q2.java
frog$ java1.4 Q2
+ /usr/local/java/jdk1.4.0/solsparc/bin/java Q2
Exception in thread "main" java.lang.NoSuchMethodError: AS.access$001(LQ2$A;)Ljava/lang/String;
at Q2$A$Inner.test(Q2.java:9)
at Q2$A.<init>(Q2.java:14)
at Q2.main(Q2.java:19)
frog$
1 class AS {
2 protected String o() { return "aso"; }
3 }
4
5 public class Q2 {
6 public class A extends AS {
7 class Inner {
8 void test() {
9 A.super.o();
10 }
11 }
12 A() {
13 Inner i = new Inner();
14 i.test();
15 }
16 }
17
18 public static void main(String[] args) {
19 A a = new Q2().new A();
20 }
21 }
frog$ javac1.4 -target 1.2 Q2.java
+ /usr/local/java/jdk1.4.0/solsparc/bin/javac -target 1.2 Q2.java
frog$ java1.4 Q2
+ /usr/local/java/jdk1.4.0/solsparc/bin/java Q2
Exception in thread "main" java.lang.NoSuchMethodError: AS.access$001(LQ2$A;)Ljava/lang/String;
at Q2$A$Inner.test(Q2.java:9)
at Q2$A.<init>(Q2.java:14)
at Q2.main(Q2.java:19)
frog$
Attachments
Issue Links
- duplicates
-
JDK-4428081 Inner class user of super causes a NoSuchMethodException
- Closed
-
JDK-4431489 access to a field by expression T.super.name is failed
- Closed
- relates to
-
JDK-4393930 Default for -target should be 1.2 in Merlin
- Closed