Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 90A56200B5C for ; Wed, 27 Jul 2016 17:42:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8C4EB160AAB; Wed, 27 Jul 2016 15:42:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DBAD7160A93 for ; Wed, 27 Jul 2016 17:42:54 +0200 (CEST) Received: (qmail 64678 invoked by uid 500); 27 Jul 2016 15:42:54 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 64539 invoked by uid 99); 27 Jul 2016 15:42:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 15:42:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C1FD5E02E4; Wed, 27 Jul 2016 15:42:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmckenzie@apache.org To: commits@cassandra.apache.org Date: Wed, 27 Jul 2016 15:42:54 -0000 Message-Id: In-Reply-To: <97612ce9c22e45c18e88a6044d23bc20@git.apache.org> References: <97612ce9c22e45c18e88a6044d23bc20@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] cassandra git commit: Fix Java Version check for versions > 100 on Windows (3.0 patch) archived-at: Wed, 27 Jul 2016 15:42:55 -0000 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 Authored: Wed Jul 27 11:41:17 2016 -0400 Committer: Josh McKenzie 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