RFR: 8250840: some tests use --enable-preview unnecessarily

Vicente Romero vromero at openjdk.java.net
Tue Sep 8 16:30:49 UTC 2020


On Tue, 8 Sep 2020 16:22:34 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> test/langtools/tools/javac/ConditionalExpressionResolvePending.java line 38:
>> 
>>> 36:  * @build combo.ComboTestHelper
>>> 37:  * @compile ConditionalExpressionResolvePending.java
>>> 38:  * @run main/othervm --enable-preview ConditionalExpressionResolvePending
>> 
>> do you still need the @run main/othervm?
>
> Yes, that's still needed. The test internally compiles some code with --enable-preview and then tries to load and run
> the code in a separate ClassLoader in the same VM. So --enable-preview at runtime is required.

ok looks good

-------------

PR: https://git.openjdk.java.net/jdk/pull/41


More information about the compiler-dev mailing list