cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [2/6] cassandra git commit: Fix Java Version check for versions > 100 on Windows (3.0 patch)
Date Wed, 27 Jul 2016 15:42:54 GMT
Fix Java Version check for versions > 100 on Windows (3.0 patch)

Patch by pmotta; reviewed by jmckenzie for CASSANDRA-12278


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/01d5fa8a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/01d5fa8a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/01d5fa8a

Branch: refs/heads/cassandra-3.9
Commit: 01d5fa8acf05973074482eda497677c161a311ac
Parents: 8d020e2
Author: Paulo Motta <pauloricardomg@gmail.com>
Authored: Wed Jul 27 11:41:17 2016 -0400
Committer: Josh McKenzie <jmckenzie@apache.org>
Committed: Wed Jul 27 11:41:17 2016 -0400

----------------------------------------------------------------------
 conf/cassandra-env.ps1 | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/01d5fa8a/conf/cassandra-env.ps1
----------------------------------------------------------------------
diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1
index 794189f..de94f5e 100644
--- a/conf/cassandra-env.ps1
+++ b/conf/cassandra-env.ps1
@@ -281,7 +281,14 @@ Function ParseJVMInfo
     }
 
     $pa = $sa[1].Split("_")
-    $env:JVM_PATCH_VERSION=$pa[1]
+    $subVersion = $pa[1]
+    # Deal with -b (build) versions
+    if ($subVersion -contains '-')
+    {
+        $patchAndBuild = $subVersion.Split("-")
+        $subVersion = $patchAndBuild[0]
+    }
+    $env:JVM_PATCH_VERSION = $subVersion
 }
 
 #-----------------------------------------------------------------------------
@@ -413,7 +420,7 @@ Function SetCassandraEnvironment
         $env:JVM_OPTS = "$env:JVM_OPTS -javaagent:""$env:CASSANDRA_HOME\lib\jamm-0.3.0.jar"""
     }
 
-    if ($env:JVM_VERSION.CompareTo("1.8.0_40") -eq -1)
+    if ($env:JVM_VERSION.CompareTo("1.8.0") -eq -1 -or [convert]::ToInt32($env:JVM_PATCH_VERSION)
-lt 40)
     {
         echo "Cassandra 3.0 and later require Java 8u40 or later."
         exit


Mime
View raw message