db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1406053 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
Date Tue, 06 Nov 2012 06:28:57 GMT
Author: kmarsden
Date: Tue Nov  6 06:28:57 2012
New Revision: 1406053

URL: http://svn.apache.org/viewvc?rev=1406053&view=rev
Log:
DERBY-5948 Update JVMInfo to include JDK8


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java?rev=1406053&r1=1406052&r2=1406053&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java Tue Nov
 6 06:28:57 2012
@@ -49,6 +49,7 @@ public abstract class JVMInfo
 		<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 @@ public abstract class JVMInfo
 	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 @@ public abstract class JVMInfo
             {
                 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 @@ public abstract class JVMInfo
 
 				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 abstract class JVMInfo
 		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 "?-?";
 		}
 	}



Mime
View raw message