RFR: JDK-8325189: Enable this-escape javac warning in java.base
Joe Darcy
darcy at openjdk.org
Tue Feb 6 17:31:54 UTC 2024
On Tue, 6 Feb 2024 14:35:52 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> After the "this-escape" lint warning was added to javac (JDK-8015831), the base module was not updated to be able to compile with this warning enabled. This PR makes the necessary changes to allow the base module to build with the warning enabled.
>
> src/java.base/share/classes/sun/net/www/MessageHeader.java line 53:
>
>> 51: }
>> 52:
>> 53: @SuppressWarnings("this-escape")
>
> An alternative here could be to make the class final. AFAICS it's not subclassed anywhere. If you'd prefer not to do this here then maybe a followup issue could be logged?
I'd prefer if that kind of change were done as a subtask of
[JDK-8325263](https://bugs.openjdk.org/browse/JDK-8325263): Address this-escape lint warnings java.base (umbrella)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17692#discussion_r1480307107
More information about the build-dev
mailing list