You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2026/05/08 09:53:16 UTC

[PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

tkobayas opened a new pull request, #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700

   … compilation
   
   Drools 10 requires Java 17+ at runtime, so accepting sub-17 language levels for DRL compilation was dead surface area. Restrict JavaConfiguration.LANGUAGE_LEVELS to {17, 18, 19, 20, 21}, bump JavaCompilerSettings defaults from "1.8" to "17", and update the javadoc, tests, and stale literals that referenced obsolete versions.
   
   findJavaVersion(String) keeps its silent fallback to "17", so stale config in user POMs (maven.compiler.release=11) or system properties (drools.dialect.java.compiler.lnglevel=1.8) keeps working. The programmatic setters (setJavaLanguageLevel, setSourceVersion, setTargetVersion) now throw on sub-17 input.
   
   Also remove the dead MemoryUtil class. It had zero callers anywhere in the repository; its core predicate hasPermGen() checked for Java 1.5/1.6/1.7, but PermGen was removed in Java 8.
   
   ---
   
   Closes https://github.com/apache/incubator-kie-drools/issues/6572
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas merged PR #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on code in PR #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700#discussion_r3209357097


##########
drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/commons/jci/compilers/NativeJavaCompilerSettingsTest.java:
##########
@@ -47,17 +47,17 @@ public void allSettings() {
         settings.setWarnings(true);
         settings.setDeprecations(true);
         settings.setSourceEncoding("My-Custom-Encoding");
-        settings.setSourceVersion("9");
-        settings.setTargetVersion("9");
+        settings.setSourceVersion("21");
+        settings.setTargetVersion("21");

Review Comment:
   @tkobayas Why the JDK version should be different here? (out of curiosity)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700#discussion_r3207904831


##########
drools-mvel/src/main/java/org/drools/mvel/java/JavaForMvelDialectConfiguration.java:
##########
@@ -35,9 +35,9 @@
  * The valid values are "ECLIPSE" and "NATIVE" only.
  * 
  * drools.dialect.java.compiler = <ECLIPSE|NATIVE>
- * drools.dialect.java.compiler.lnglevel = <1.5|1.6>
- * 
- * The default compiler is Eclipse and the default lngLevel is 1.5.
+ * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21>
+ *
+ * The default compiler is Eclipse and the default lngLevel is 17.
  * The lngLevel will attempt to autodiscover your system using the 

Review Comment:
   This class-level Javadoc claims the default compiler is Eclipse and default language level is 17, but `JavaForMvelDialectConfiguration()` (and its superclasses) don’t set those defaults unless `init(...)` is called. Either initialize defaults in constructors or clarify in the Javadoc that defaults are established during `init(...)`/builder configuration, not by the default constructor.
   



##########
kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java:
##########
@@ -31,7 +31,7 @@
  * The valid values are "ECLIPSE" and "NATIVE" only.
  * 
  * drools.dialect.java.compiler = <ECLIPSE|NATIVE>
- * drools.dialect.java.compiler.lnglevel = <1.5|...|21>
+ * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21>
  * 
  * The default compiler is Eclipse and the default lngLevel is 17.
  * The lngLevel will attempt to autodiscover your system using the 

Review Comment:
   The Javadoc states that the default compiler is Eclipse and the default language level is 17, but `JavaConfiguration` itself doesn’t initialize `compiler` or `languageLevel` (both are `null` until set). Consider either initializing these fields (e.g., in a constructor) or adjusting the Javadoc to clarify that defaults are applied by callers (e.g., `JavaDialectConfiguration.init(...)` / `findJavaVersion()`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700#discussion_r3215881752


##########
drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/commons/jci/compilers/NativeJavaCompilerSettingsTest.java:
##########
@@ -47,17 +47,17 @@ public void allSettings() {
         settings.setWarnings(true);
         settings.setDeprecations(true);
         settings.setSourceEncoding("My-Custom-Encoding");
-        settings.setSourceVersion("9");
-        settings.setTargetVersion("9");
+        settings.setSourceVersion("21");
+        settings.setTargetVersion("21");

Review Comment:
   "9" is the cleaned-up version, so there is no value in testing it now. I picked "21" because this test case is to test non-default value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700#discussion_r3215873319


##########
kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java:
##########
@@ -31,7 +31,7 @@
  * The valid values are "ECLIPSE" and "NATIVE" only.
  * 
  * drools.dialect.java.compiler = <ECLIPSE|NATIVE>
- * drools.dialect.java.compiler.lnglevel = <1.5|...|21>
+ * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21>
  * 
  * The default compiler is Eclipse and the default lngLevel is 17.
  * The lngLevel will attempt to autodiscover your system using the 

Review Comment:
   adjusted the javadoc.



##########
drools-mvel/src/main/java/org/drools/mvel/java/JavaForMvelDialectConfiguration.java:
##########
@@ -35,9 +35,9 @@
  * The valid values are "ECLIPSE" and "NATIVE" only.
  * 
  * drools.dialect.java.compiler = <ECLIPSE|NATIVE>
- * drools.dialect.java.compiler.lnglevel = <1.5|1.6>
- * 
- * The default compiler is Eclipse and the default lngLevel is 1.5.
+ * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21>
+ *
+ * The default compiler is Eclipse and the default lngLevel is 17.
  * The lngLevel will attempt to autodiscover your system using the 

Review Comment:
   adjusted the javadoc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-drools-6572] Clean up old/unused Java versions for DRL… [incubator-kie-drools]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #6700:
URL: https://github.com/apache/incubator-kie-drools/pull/6700#discussion_r3215881752


##########
drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/commons/jci/compilers/NativeJavaCompilerSettingsTest.java:
##########
@@ -47,17 +47,17 @@ public void allSettings() {
         settings.setWarnings(true);
         settings.setDeprecations(true);
         settings.setSourceEncoding("My-Custom-Encoding");
-        settings.setSourceVersion("9");
-        settings.setTargetVersion("9");
+        settings.setSourceVersion("21");
+        settings.setTargetVersion("21");

Review Comment:
   "9" is the cleaned-up version, so there is no value in testing it now. I picked "21" because it is different from the default ("17").



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org