On Mon, 15 Dec 2025 21:11:24 GMT, Daniel D. Daugherty <[email protected]> 
wrote:

>> test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java line 29:
>> 
>>> 27:  * @summary Verify that anonymous class binaries have the correct flags 
>>> set
>>> 28:  * @modules java.base/jdk.internal.misc
>>> 29:  * @requires !java.enablePreview
>> 
>> Why is `@requires !java.enablePreview` needed here? The test's id value is 
>> NoPreview so that might
>> indicate that the test doesn't support --enable-preview bits, but I had to 
>> expand the review's context
>> to see that id value.
>
> Another thought occurred to me. Perhaps add a comment line above the 
> `@requires`:
> 
> @comment Test does not like Valhalla value classes.
> 
> or something like that. I think it would be good if we added a comment
> when we use `@requires !java.enablePreview` to indicate which preview
> feature is problematic.

This test is run twice, once without preview and once with preview. We need to 
guard the test without preview, such that if someone manually specifies 
`JTREG=JAVA_OPTIONS=--enable-preview`, the test doesn't fail. I'll add a 
comment.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1793#discussion_r2622416792

Reply via email to