FULL PRODUCT VERSION :
jdk1.6.0_33, jdk1.5.0_22
ADDITIONAL OS VERSION INFORMATION :
Windows XP
A DESCRIPTION OF THE PROBLEM :
see bug id 6707323 :
Javac fails to compile inner class, when a secondary inner class (inner class of the inner class)
is imported first. It appears that importing a secondary inner class hides symbols in inner class.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Javac fails to compile inner class, when a secondary inner class (inner class of the inner class)
is imported first. It appears that importing a secondary inner class hides symbols in inner class.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
BUILD SUCCESSFUL
ACTUAL -
BUILD FAILED
ERROR MESSAGES/STACK TRACES THAT OCCUR :
pack1\Test.java:8: cannot find symbol
symbol : class Test2
location: class pack1.Test
public class Test3 extends Test2 {
^
1 error
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
pack2.Test2 class :
--------------------------
package pack2;
public class Test2
{
}
pack1.Test class :
-------------------------
package pack1;
import pack1.Test.Test3.Test4;
import pack2.Test2;
public class Test extends Test2 {
public class Test3 extends Test2 {
public class Test4 {
}
}
public void test() {
Test4 test4;
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
change sequence of import statements
jdk1.6.0_33, jdk1.5.0_22
ADDITIONAL OS VERSION INFORMATION :
Windows XP
A DESCRIPTION OF THE PROBLEM :
see bug id 6707323 :
Javac fails to compile inner class, when a secondary inner class (inner class of the inner class)
is imported first. It appears that importing a secondary inner class hides symbols in inner class.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Javac fails to compile inner class, when a secondary inner class (inner class of the inner class)
is imported first. It appears that importing a secondary inner class hides symbols in inner class.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
BUILD SUCCESSFUL
ACTUAL -
BUILD FAILED
ERROR MESSAGES/STACK TRACES THAT OCCUR :
pack1\Test.java:8: cannot find symbol
symbol : class Test2
location: class pack1.Test
public class Test3 extends Test2 {
^
1 error
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
pack2.Test2 class :
--------------------------
package pack2;
public class Test2
{
}
pack1.Test class :
-------------------------
package pack1;
import pack1.Test.Test3.Test4;
import pack2.Test2;
public class Test extends Test2 {
public class Test3 extends Test2 {
public class Test4 {
}
}
public void test() {
Test4 test4;
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
change sequence of import statements
- duplicates
-
JDK-7101822 Compiling depends on order of imports
-
- Closed
-