JDK-8325189 : Enable this-escape javac warning in java.base
  • Type: Enhancement
  • Component: core-libs
  • Affected Version: 23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-02-02
  • Updated: 2024-02-12
  • Resolved: 2024-02-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b09Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.
Comments
Changeset: fbd15b20 Author: Joe Darcy <darcy@openjdk.org> Date: 2024-02-07 20:05:11 +0000 URL: https://git.openjdk.org/jdk/commit/fbd15b20878b276ccd41128116f73b91b6d4c159
07-02-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17692 Date: 2024-02-02 23:36:41 +0000
02-02-2024

To turn off the Werror setting of the build: diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index ff7c90e5785..0da34fa3493 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -268,7 +268,7 @@ define SetupJavaCompilationBody endif # Allow overriding on the command line - JAVA_WARNINGS_ARE_ERRORS ?= -Werror + # JAVA_WARNINGS_ARE_ERRORS ?= -Werror # Tell javac to do exactly as told and no more PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
02-02-2024