On Mon, 14 Nov 2022 19:07:42 GMT, Alan Bateman <[email protected]> wrote:

>> Update the compile command in JdbLastErrorTest.java so that it doesn't need 
>> to be modified with each new JDK release to keep using preview features.
>
> test/jdk/com/sun/jdi/JdbLastErrorTest.java line 31:
> 
>> 29:  * @library /test/lib
>> 30:  * @run compile --release ${jdk.version} --enable-preview 
>> JdbLastErrorTest.java
>> 31:  * @run main/othervm --enable-preview JdbLastErrorTest
> 
> Better still would be to add  `@enablePreview`. That would allow you the 
> `@run compile` line to go away and you can drop the `--enable-preview` from 
> the `@run main`.

Is that a new jtreg feature? I've used the idiom in the updated version of this 
file elsewhere in the JDK.

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

PR: https://git.openjdk.org/jdk/pull/11139

Reply via email to