tkobayas commented on code in PR #6569:
URL:
https://github.com/apache/incubator-kie-drools/pull/6569#discussion_r2735910845
##########
kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java:
##########
@@ -86,31 +86,19 @@ public static String findJavaVersion() {
}
public static String findJavaVersion(String level) {
- if (level.startsWith("1.5")) {
- return "1.5";
- } else if (level.startsWith("1.6")) {
- return "1.6";
- } else if (level.startsWith("1.7")) {
- return "1.7";
- } else if (level.startsWith("1.8")) {
- return "1.8";
- } else if (level.startsWith("9")) {
- return "9";
- } else if (level.startsWith("10")) {
- return "10";
- } else if (level.startsWith("15")) {
- return "15";
- } else if (level.startsWith("16")) {
- return "16";
- } else if (level.startsWith("17")) {
- return "17";
- } else if (level.startsWith("18")) {
- return "18";
- } else if (level.startsWith("19")) {
- return "19";
+ String normalized = normalizeVersion(level);
+ if (Arrays.binarySearch(LANGUAGE_LEVELS, normalized) >= 0) {
+ return normalized;
}
+ return "11"; // default
Review Comment:
@yesamer You are right. Thank you!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]