Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6437349

JSR 199: JavaFileObject.isNameCompatible() will give true with some incompatible kinds

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        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

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ahe Peter Ahe
                  Reporter:
                  savadhansunw Seetharama Avadhanam (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: