-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
1.3.0
-
generic
-
solaris_7
javac 1.3 fails to report ambiguous class as javac 1.2 did:
=======================
foo/FileSystem.java
=======================
package foo;
public class FileSystem {
}
=======================
Test.java
=======================
import java.io.*;
import foo.*; // This is ambiguous
//import foo.FileSystem;// This is not ambiguous
public class Test {
public void someMethod(FileSystem f) {
}
}
javac 1.2 reports the following error when compiling Test:
danmark[929] javac12 foo/FileSystem.java
danmark[930] javac12 Test.java
Test.java:6: Ambiguous class: java.io.FileSystem and foo.FileSystem
public void someMethod(FileSystem f) {
^
1 error
danmark[931]
javac 1.3 doesn't report the error.
If the import statement is changed to 'import foo.FileSystem;', neither compiler reports error.
=======================
foo/FileSystem.java
=======================
package foo;
public class FileSystem {
}
=======================
Test.java
=======================
import java.io.*;
import foo.*; // This is ambiguous
//import foo.FileSystem;// This is not ambiguous
public class Test {
public void someMethod(FileSystem f) {
}
}
javac 1.2 reports the following error when compiling Test:
danmark[929] javac12 foo/FileSystem.java
danmark[930] javac12 Test.java
Test.java:6: Ambiguous class: java.io.FileSystem and foo.FileSystem
public void someMethod(FileSystem f) {
^
1 error
danmark[931]
javac 1.3 doesn't report the error.
If the import statement is changed to 'import foo.FileSystem;', neither compiler reports error.