This is an automated email from the ASF dual-hosted git repository.
imaxon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 90b2d6787a [ASTERIXDB-3198] Update JRE warning
90b2d6787a is described below
commit 90b2d6787ae5c43a058a102d79aa1a944dafa479
Author: Ian Maxon <[email protected]>
AuthorDate: Thu May 25 15:47:32 2023 -0700
[ASTERIXDB-3198] Update JRE warning
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Update the warning to allow for 11 and 17, disallow anything older,
and warn about anything newer
Change-Id: I217da04d06884d841c4a56aee3ab9815ce659da8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17558
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Ian Maxon <[email protected]>
Reviewed-by: Wail Alkowaileet <[email protected]>
---
.../hyracks/bootstrap/ApplicationConfigurator.java | 24 ++++++++++------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
index 98a18200bb..44433dbcde 100644
---
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
+++
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/ApplicationConfigurator.java
@@ -71,19 +71,17 @@ public class ApplicationConfigurator {
final String javaVersion = System.getProperty("java.version");
LOGGER.info("Found JRE version " + javaVersion);
String[] splits = javaVersion.split("\\.");
- if ("1".equals(splits[0])) {
- switch (splits[1]) {
- case "9":
- LOGGER.warn("JRE version \"" + javaVersion + "\" is
untested");
- //fall-through
- case "8":
- return;
- default:
- throw
RuntimeDataException.create(ErrorCode.UNSUPPORTED_JRE,
- "a minimum version of JRE of 1.8 is required, but
is currently: \"" + javaVersion + "\"");
- }
- } else {
- LOGGER.warn("JRE version \"" + javaVersion + "\" is untested");
+ switch (splits[0]) {
+ //versions before 9 start with a 1, e.g. 1.8
+ case "1":
+ throw RuntimeDataException.create(ErrorCode.UNSUPPORTED_JRE,
+ "a minimum version of JRE of 11 is required, but is
currently: \"" + javaVersion + "\"");
+ case "11":
+ case "17":
+ break;
+ default:
+ LOGGER.warn("JRE version \"" + javaVersion + "\" is untested");
+ break;
}
}