Skip to content
Browse files

DERBY-5948 Update JVMInfo to include JDK8

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1406053 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent e744e84 commit 88fc5dd00aeb7fec1a7ed964b80d897ecfbd6530 @kmarsden kmarsden committed Nov 6, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
View
10 java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
@@ -49,6 +49,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
<LI> 6 - J2SE_15 - JDK 1.5
<LI> 7 - J2SE_16 - JDK 1.6
<LI> 8 - J2SE_17 - JDK 1.7
+ <LI> 9 - J2SE_18 - JDK 1.8
</UL>
*/
public static final int JDK_ID;
@@ -58,6 +59,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
public static final int J2SE_15 = 6; // aka J2SE 5.0
public static final int J2SE_16 = 7; // Java SE 6, not J2SE
public static final int J2SE_17 = 8; // Java SE 7
+ public static final int J2SE_18 = 9;
public static final boolean J2ME;
@@ -137,6 +139,9 @@ else if (javaVersion.equals("1.7"))
{
id = J2SE_17;
}
+ else if (javaVersion.equals("1.8")) {
+ id = J2SE_18;
+ }
else
{
// aussme our lowest support unless the java spec
@@ -145,8 +150,8 @@ else if (javaVersion.equals("1.7"))
try {
- if (Float.parseFloat(javaVersion) > 1.7f)
- id = J2SE_17;
+ if (Float.parseFloat(javaVersion) > 1.8f)
+ id = J2SE_18;
} catch (NumberFormatException nfe) {
}
}
@@ -177,6 +182,7 @@ public static String derbyVMLevel()
case J2SE_15: return "J2SE 5.0 - JDBC 3.0";
case J2SE_16: return "Java SE 6 - JDBC 4.1";
case J2SE_17: return "Java SE 7 - JDBC 4.1";
+ case J2SE_18: return "Java SE 8 - JDBC 4.1";
default: return "?-?";
}
}

0 comments on commit 88fc5dd

Please sign in to comment.
Something went wrong with that request. Please try again.