-
Bug
-
Resolution: Fixed
-
P2
-
8, 11, 12
-
b10
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Microsoft Windows [Version 10.0.17763.195]
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
openjdk version "12-ea" 2019-03-19
OpenJDK Runtime Environment (build 12-ea+19)
OpenJDK 64-Bit Server VM (build 12-ea+19, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
The Javadoc tool fails to run if a directory it needs to write into already exist. See the attached testcase.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a sub-directory "com.company.java"
2. Run "javadoc.exe" @options @packages @argfile" where
* "options", "argfile" files are empty
* "packages" contains one line: "com.company.java"
The bug is triggered by package names ending with "java".
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Javadoc tool should attempt to process the source files
ACTUAL -
Tool fails with:
javadoc: error - fatal error encountered: java.lang.IllegalArgumentException: directories not supported
javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page
(http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
for duplicates. Include error messages and the following diagnostic in your report. Thank you.
java.lang.IllegalArgumentException: directories not supported
at jdk.compiler/com.sun.tools.javac.file.PathFileObject.<init>(PathFileObject.java:353)
at jdk.compiler/com.sun.tools.javac.file.PathFileObject$SimpleFileObject.<init>(PathFileObject.java:282)
at jdk.compiler/com.sun.tools.javac.file.PathFileObject.forSimplePath(PathFileObject.java:276)
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromPaths(JavacFileManager.java:906)
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromStrings(JavacFileManager.java:211)
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getJavaFileObjects(JavacFileManager.java:216)
at jdk.javadoc/jdk.javadoc.internal.tool.JavadocTool.getEnvironment(JavadocTool.java:169)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:576)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:432)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
FREQUENCY : always
Microsoft Windows [Version 10.0.17763.195]
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
openjdk version "12-ea" 2019-03-19
OpenJDK Runtime Environment (build 12-ea+19)
OpenJDK 64-Bit Server VM (build 12-ea+19, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
The Javadoc tool fails to run if a directory it needs to write into already exist. See the attached testcase.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a sub-directory "com.company.java"
2. Run "javadoc.exe" @options @packages @argfile" where
* "options", "argfile" files are empty
* "packages" contains one line: "com.company.java"
The bug is triggered by package names ending with "java".
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Javadoc tool should attempt to process the source files
ACTUAL -
Tool fails with:
javadoc: error - fatal error encountered: java.lang.IllegalArgumentException: directories not supported
javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page
(http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
for duplicates. Include error messages and the following diagnostic in your report. Thank you.
java.lang.IllegalArgumentException: directories not supported
at jdk.compiler/com.sun.tools.javac.file.PathFileObject.<init>(PathFileObject.java:353)
at jdk.compiler/com.sun.tools.javac.file.PathFileObject$SimpleFileObject.<init>(PathFileObject.java:282)
at jdk.compiler/com.sun.tools.javac.file.PathFileObject.forSimplePath(PathFileObject.java:276)
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromPaths(JavacFileManager.java:906)
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromStrings(JavacFileManager.java:211)
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getJavaFileObjects(JavacFileManager.java:216)
at jdk.javadoc/jdk.javadoc.internal.tool.JavadocTool.getEnvironment(JavadocTool.java:169)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:576)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:432)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
FREQUENCY : always