This bug has been introduced in Kestrel.
Compliller fails trying to import a class if there is a package
with the same name.
Here is example to demonstrate this bug:
Class A/B.java:
package A;
public class B {
}
___
A/B/C.java:
package A.B;
import A.*;
public class C{
}
___
Output:
%echo $CLASSPATH
/home/dsilaev/java_tests
%/usr/local/java/jdk1.3/solaris/bin/javac C.java
C.java:1: package A.B clashes with class of same name
package A.B;
^
1 error
%
###@###.### 1999-06-08
This bug is cause of failure JCK build:
cd classes ; make build
/usr/bin/grep '^src/share/classes/javasoft/sqe/jck_internal/' ../../JCK-runtime-api/files.lst | /usr/bin/sed -e '/\.java$/b' -e d > files-internal.lst
precompile internal libraries
CLASSPATH=../../JCK-runtime-api/classes:../../../src/share/classes:/opt/build13/2.0zn/jmpp.jar:/opt/build13/2.0zn/jckutils.jar:../../../../jck13-tests-build/JCK-runtime-api-13/javatest.jar:/opt/build13/jdk1.3/G/solaris/lib/tools.jar /opt/build13/jdk1.3/G/solaris/bin/javac -d ../../JCK-runtime-api/classes `cat files-internal.lst | /usr/bin/sed -e "s|^|../../../|"`
echo internal libraries precompiled at `date` > precompile-internal.ok
/usr/bin/grep '^src/share/classes/javasoft/' ../../JCK-runtime-api/files.lst | /usr/bin/grep -v '/jck_internal/' | /usr/bin/sed -e '/\.java$/b' -e d > files-javasoft.lst
echo "`pwd` copy-files-javasoft.ok" > copy-files-javasoft.tim
echo "Start: `date`" >> copy-files-javasoft.tim
../../JCK-runtime-api/install ../../.. ../../../../jck13-tests-build/JCK-runtime-api-13 - < files-javasoft.lst
echo "End: `date`" >> copy-files-javasoft.tim
echo copied files-javasoft files at `date` > copy-files-javasoft.ok
precompile shared test libraries
CLASSPATH=../../../../jck13-tests-build/JCK-runtime-api-13/classes:../../../../jck13-tests-build/JCK-runtime-api-13/javatest.jar /opt/build13/jdk1.3/G/solaris/bin/javac -d ../../../../jck13-tests-build/JCK-runtime-api-13/classes `cat files-javasoft.lst | /usr/bin/sed -e "s|^|../../../|"`
../../../src/share/classes/javasoft/sqe/serial/spec/java/rmi/activation/ActivationGroupDesc.java:40: class javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc clashes with package of same name
public class ActivationGroupDesc extends StreamObjectClass
^
../../../src/share/classes/javasoft/sqe/serial/spec/java/rmi/activation/ActivationGroupDesc/CommandEnvironment.java:27: package javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc clashes with class of same name
package javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc;
^
Note: Some input files use or override a deprecated API. Recompile with -deprecation for details.
2 errors
*** Error code 1
make: Fatal error: Command failed for target `precompile-javasoft.ok'
Current working directory /opt/build13/jck13-tests/build/JCK-runtime-api/classes
*** Error code 1
make: Fatal error: Command failed for target `classes'
Current working directory /opt/build13/jck13-tests/build/JCK-runtime-api
*** Error code 1
make: Fatal error: Command failed for target `JCK-runtime-api'
Compliller fails trying to import a class if there is a package
with the same name.
Here is example to demonstrate this bug:
Class A/B.java:
package A;
public class B {
}
___
A/B/C.java:
package A.B;
import A.*;
public class C{
}
___
Output:
%echo $CLASSPATH
/home/dsilaev/java_tests
%/usr/local/java/jdk1.3/solaris/bin/javac C.java
C.java:1: package A.B clashes with class of same name
package A.B;
^
1 error
%
###@###.### 1999-06-08
This bug is cause of failure JCK build:
cd classes ; make build
/usr/bin/grep '^src/share/classes/javasoft/sqe/jck_internal/' ../../JCK-runtime-api/files.lst | /usr/bin/sed -e '/\.java$/b' -e d > files-internal.lst
precompile internal libraries
CLASSPATH=../../JCK-runtime-api/classes:../../../src/share/classes:/opt/build13/2.0zn/jmpp.jar:/opt/build13/2.0zn/jckutils.jar:../../../../jck13-tests-build/JCK-runtime-api-13/javatest.jar:/opt/build13/jdk1.3/G/solaris/lib/tools.jar /opt/build13/jdk1.3/G/solaris/bin/javac -d ../../JCK-runtime-api/classes `cat files-internal.lst | /usr/bin/sed -e "s|^|../../../|"`
echo internal libraries precompiled at `date` > precompile-internal.ok
/usr/bin/grep '^src/share/classes/javasoft/' ../../JCK-runtime-api/files.lst | /usr/bin/grep -v '/jck_internal/' | /usr/bin/sed -e '/\.java$/b' -e d > files-javasoft.lst
echo "`pwd` copy-files-javasoft.ok" > copy-files-javasoft.tim
echo "Start: `date`" >> copy-files-javasoft.tim
../../JCK-runtime-api/install ../../.. ../../../../jck13-tests-build/JCK-runtime-api-13 - < files-javasoft.lst
echo "End: `date`" >> copy-files-javasoft.tim
echo copied files-javasoft files at `date` > copy-files-javasoft.ok
precompile shared test libraries
CLASSPATH=../../../../jck13-tests-build/JCK-runtime-api-13/classes:../../../../jck13-tests-build/JCK-runtime-api-13/javatest.jar /opt/build13/jdk1.3/G/solaris/bin/javac -d ../../../../jck13-tests-build/JCK-runtime-api-13/classes `cat files-javasoft.lst | /usr/bin/sed -e "s|^|../../../|"`
../../../src/share/classes/javasoft/sqe/serial/spec/java/rmi/activation/ActivationGroupDesc.java:40: class javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc clashes with package of same name
public class ActivationGroupDesc extends StreamObjectClass
^
../../../src/share/classes/javasoft/sqe/serial/spec/java/rmi/activation/ActivationGroupDesc/CommandEnvironment.java:27: package javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc clashes with class of same name
package javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc;
^
Note: Some input files use or override a deprecated API. Recompile with -deprecation for details.
2 errors
*** Error code 1
make: Fatal error: Command failed for target `precompile-javasoft.ok'
Current working directory /opt/build13/jck13-tests/build/JCK-runtime-api/classes
*** Error code 1
make: Fatal error: Command failed for target `classes'
Current working directory /opt/build13/jck13-tests/build/JCK-runtime-api
*** Error code 1
make: Fatal error: Command failed for target `JCK-runtime-api'
- duplicates
-
JDK-4027499 Checks for package/class ambiguity are incomplete and perhaps incorrect.
- Closed
-
JDK-4101529 compiler should never create package/class ambiguity
- Closed