-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b03
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2149109 | 6-pool | Jonathan Gibbons | P3 | Closed | Won't Fix |
JavaFileObject.isNameCompatible() will give true with some incompatible kinds
<testcase>
import java.util.Arrays;
import javax.tools.*;
import static javax.tools.StandardLocation.*;
import static javax.tools.JavaFileObject.Kind.*;
public class Foo {
public static void main(String[] args) throws Exception {
JavaCompilerTool javac = ToolProvider.getSystemJavaCompilerTool();
JavaFileManager jfm = javac.getStandardFileManager(null);
JavaFileObject jfo = jfm.getJavaFileForInput(CLASS_PATH, "Foo", SOURCE);
System.out.println(jfo.isNameCompatible("Foo.java",OTHER));
}
}
</testcase>
<output>
true
</output>
<java-version>
bash-3.00$ java -version
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode)
</java-version>
Failing case: javac/api/JavaFileObject/JFOTest03
<testcase>
import java.util.Arrays;
import javax.tools.*;
import static javax.tools.StandardLocation.*;
import static javax.tools.JavaFileObject.Kind.*;
public class Foo {
public static void main(String[] args) throws Exception {
JavaCompilerTool javac = ToolProvider.getSystemJavaCompilerTool();
JavaFileManager jfm = javac.getStandardFileManager(null);
JavaFileObject jfo = jfm.getJavaFileForInput(CLASS_PATH, "Foo", SOURCE);
System.out.println(jfo.isNameCompatible("Foo.java",OTHER));
}
}
</testcase>
<output>
true
</output>
<java-version>
bash-3.00$ java -version
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode)
</java-version>
Failing case: javac/api/JavaFileObject/JFOTest03
- backported by
-
JDK-2149109 JSR 199: JavaFileObject.isNameCompatible() will give true with some incompatible kinds
- Closed
- relates to
-
JDK-6423003 JSR 199: confusing help message with compiler API
- Closed
-
JDK-6452876 JSR 199: DiagnosticCollector.report(null) should throw NPE
- Closed
-
JDK-6455452 JSR 199: unnecessary imports in ForwardingJavaFileObject.java
- Closed
-
JDK-6440333 SimpleJavaFileObject.toString() generates URI with some extra message
- Closed