JDK-8295176 : some langtools test pollutes source tree
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-10-11
  • Updated: 2022-11-03
  • Resolved: 2022-10-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 b20Fixed
Related Reports
Relates :  
Description
Running `make test TEST=langtools:tier1` from the build directory creates the file test/langtools/tools/javac/options/release/ReleaseOption.class in the source tree.  Running the ReleaseOption.java test does *not* create that file.

Comments
Changeset: 71aa8210 Author: Jan Lahoda <jlahoda@openjdk.org> Date: 2022-10-18 07:45:23 +0000 URL: https://git.openjdk.org/jdk/commit/71aa8210910dbafe30eccc772eaa7747f46be0cd
18-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10724 Date: 2022-10-17 09:35:40 +0000
17-10-2022

It's falling foul of the javac rule: if no output directory is specified, write the class file next to the source file. It should be enough to add `-d .` or even `-proc:only` into the list of options. List<String> options = Arrays.asList("--release", "8", "-XDrawDiagnostics", "-Xlint:-options");
12-10-2022

It's coming from open/test/langtools/tools/javac/options/release/ReleaseOptionThroughAPI.java
12-10-2022