This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new ed7d8095d3 Remove the this-escape lint exclusion from the build
ed7d8095d3 is described below
commit ed7d8095d378beb8f81285f69e8890bb8bc1fd74
Author: Mridul Pathak <[email protected]>
AuthorDate: Sun Nov 1 19:30:54 2026 +0530
Remove the this-escape lint exclusion from the build
The this-escape warnings that the JDK 21 and later javac reported have all
been fixed, so the build no longer needs to turn that lint off when it compiles
on a JDK that knows it. Compiling on JDK 25 with plugins now shows no
this-escape and no varargs warnings, leaving only the 19 deprecation warnings
that need the Java 25 target. Any new escape will show up as a warning in the
JDK 21 CI build. The build does not fail on warnings yet: that waits until the
deprecation warnings are fixed.
---
build.gradle | 6 ------
1 file changed, 6 deletions(-)
diff --git a/build.gradle b/build.gradle
index c32d5c6809..89ccaee92e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -212,12 +212,6 @@ tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
if (!project.hasProperty('Xlint:none')) {
options.compilerArgs << '-Xlint:all'
- // this-escape lint was introduced in JDK 21's javac and is an invalid
flag on JDK 17,
- // so only pass it when compiling with a JDK that recognizes it.
- if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
- // Exclude this-escape warnings pending proper refactoring of
widget/service classes.
- options.compilerArgs << '-Xlint:-this-escape'
- }
}
}