Compare commits

...

2 Commits

Author SHA1 Message Date
qiongli
82174dc5ea feat(TDQ-21471):Iterate all context variables to check prompt needed (#6475) 2023-10-16 15:07:27 +08:00
Zhiwei Xue
c942e2ee35 feat(TUP-40401): improve Java17 check (#6468) 2023-10-13 14:35:34 +08:00
2 changed files with 4 additions and 4 deletions

View File

@@ -122,7 +122,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
return false;
}
version = TalendQuoteUtils.removeQuotesIfExist(version);
if (Integer.parseInt(version.split("\\.")[0]) > 8) {
if (Integer.parseInt(version.split("[^\\d]+")[0]) > 8) {
// since Java 9
return true;
}
@@ -135,7 +135,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
private static boolean isJava17() {
boolean isJava17 = false;
String javaVersion = System.getProperty("java.version");
String[] arr = javaVersion.split("\\.");
String[] arr = javaVersion.split("[^\\d]+");
try {
isJava17 = Integer.parseInt(arr[0]) >= 17;
} catch (NumberFormatException e) {
@@ -144,5 +144,5 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
}
return isJava17;
}
}

View File

@@ -2287,7 +2287,7 @@ public final class ConnectionContextHelper {
Assert.isNotNull(context);
// Prompt for context values ?
for (IContextParameter parameter : context.getContextParameterList()) {
if (parameter.isPromptNeeded()) {
if (parameter.isPromptNeeded() || ContextUtils.isPromptNeeded(contexts, parameter.getName())) {
nbValues++;
break;
}