RFR: 8355753: @SuppressWarnings("this-escape") not respected for indirect leak via field [v2]
Archie Cobbs
acobbs at openjdk.org
Thu May 29 21:25:38 UTC 2025
On Thu, 29 May 2025 19:48:39 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> test/langtools/tools/javac/warnings/ThisEscape.java line 769:
>>
>>> 767: }
>>> 768:
>>> 769: // JDK-8355753 - @SuppressWarnings("this-escape") not respected for indirect leak via field
>>
>> nit: consider adding a similar test case with an additional constructor that is not annotated with the @SuppressAnnotations annotation so that the warning is issued
>
>> nit: consider adding a similar test case with an additional constructor that is not annotated with the @SuppressAnnotations annotation so that the warning is issued
>
> and probably another variation doing something like:
>
> private int x;
>
> {
> x = this.mightLeak();
> }
Hi @vicente-romero-oracle, thanks for the suggestions. They should be implemented in 65e2679e0ed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24932#discussion_r2114770567
More information about the compiler-dev
mailing list