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.
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.
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