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

JSR 199: StandardJavaFileManager.inferBinaryName will give extra message with PLATFORM_CLASS_PATH

    Details

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

      Description

      StandardJavaFileManager.inferBinaryName will give extra message with PLATFORM_CLASS_PATH

      <Testcase>
      import javax.tools.*;
      import static javax.tools.StandardLocation.*;
      import static javax.tools.JavaFileObject.Kind.*;

      public class Foo {
           public static void main(String... arg) throws Exception {
               JavaCompilerTool javac = ToolProvider.getSystemJavaCompilerTool();
               JavaFileManager jfm = javac.getStandardFileManager(null);
               JavaFileObject jfo = jfm.getJavaFileForInput(CLASS_PATH,"Foo",SOURCE);
      System.out.println(jfm.inferBinaryName(PLATFORM_CLASS_PATH,jfo));
           }
      }
      </Testcase>

      <output>
      bash-3.00$ java Foo
      inferBinaryName failed for ./Foo.java
      null
      </output>

      As per the spec, inferBinaryName should return 'null'.
      Extra message "inferBinaryName failed for ./Foo.java" is not required.

      <java-version>

      </java-version>

        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: