RFR: 7904028: jcstress: Address s.m.Unsafe use warnings which fail build on JDK 23+ [v2]
Pavel Rappo
prappo at openjdk.org
Thu Jun 19 09:48:29 UTC 2025
On Thu, 19 Jun 2025 09:35:03 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Sure, OK.
Sorry, I answered your question only partially; my bad. This is an excerpt from that annotation doc comment:
> As a matter of style, programmers should always use this annotation on the most deeply nested element where it is effective. For example, if you want to suppress a warning in a particular method, you should annotate that method rather than its class.
I think that one of the reasons behind this recommendation is to minimise the chances that one day you _unknowingly_ suppress more than you think you do: in the future, something that you use in the class might be deprecated for removal, and you won't know it.
-------------
PR Comment: https://git.openjdk.org/jcstress/pull/165#issuecomment-2987449844
More information about the jcstress-dev
mailing list