When using the Java Compiler API, the user can provide a file manager, and can specify path-related options when creating a task. Currently, such options will have a side effect on setting the locations in the underlying file manager. This is unexpected.
It would be better if any path-related options were only in effect for the duration of the compilation.
This Issue is filed for javac, but applies equally to other tools that provide an API, such as javadoc. It applies to a lesser extent to javah and javap, but although those tools are internally structured to use a file manager and use a tool/getTask architecture, that API is not currently public. If we fix javac, we should fix the other tools at the same time, or else file separate follow-up tasks.
It would be better if any path-related options were only in effect for the duration of the compilation.
This Issue is filed for javac, but applies equally to other tools that provide an API, such as javadoc. It applies to a lesser extent to javah and javap, but although those tools are internally structured to use a file manager and use a tool/getTask architecture, that API is not currently public. If we fix javac, we should fix the other tools at the same time, or else file separate follow-up tasks.
- duplicates
-
JDK-8163588 Confusing error while compiling via JSR199 API using the same file manager
-
- Closed
-