RFR: 8281507: Two javac tests have bad jtreg `@clean` tags
Jonathan Gibbons
jjg at openjdk.java.net
Wed Feb 9 23:19:09 UTC 2022
On Wed, 9 Feb 2022 06:44:59 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Apparently, jtreg does not support `*` globbing. It now throws errors for upcoming jtreg 7.
>
> Additional testing:
> - [x] Affected tests still pass
Suggest using `@clean *` to remove all previously compiled class files for the test. This seems closest to the original intent.
test/langtools/tools/javac/8074306/TestSyntheticNullChecks.java line 30:
> 28: * @compile -source 7 -target 7 TestSyntheticNullChecks.java
> 29: * @run main TestSyntheticNullChecks 7
> 30: * @clean TestSyntheticNullChecks
This test class has an inner class. If the original intent was to try to remove all class files, the change is not equivalent, and will not do that; it will clean the main class, but not the nested class.
You may want to use `@clean *` instead, which will clean (remove) all class files in the default package.
test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java line 37:
> 35: * @modules jdk.jdeps/com.sun.tools.classfile
> 36: *
> 37: * @clean TestIndyStringConcat
While this class does not appear to generate any nested classes, you may still want to use `@clean *` to ensure that any/all previously generated class files are removed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7398
More information about the compiler-dev
mailing list