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 4BA19200B58 for ; Wed, 27 Jul 2016 17:40:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A943160AA9; Wed, 27 Jul 2016 15:40:22 +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 97942160A6F for ; Wed, 27 Jul 2016 17:40:21 +0200 (CEST) Received: (qmail 60139 invoked by uid 500); 27 Jul 2016 15:40:20 -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 60102 invoked by uid 99); 27 Jul 2016 15:40:20 -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:40:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A28E3E02A2; Wed, 27 Jul 2016 15:40:20 +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:40:20 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cassandra git commit: Fix Java Version check for versions > 100 on Windows archived-at: Wed, 27 Jul 2016 15:40:22 -0000 Repository: cassandra Updated Branches: refs/heads/cassandra-3.9 e9e6a0d4e -> 247a56bca refs/heads/trunk e1393ec54 -> 6284b6dcc Fix Java Version check for versions > 100 on Windows 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/247a56bc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/247a56bc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/247a56bc Branch: refs/heads/cassandra-3.9 Commit: 247a56bca72364d43e1b74a35ee31cd40d3bac46 Parents: e9e6a0d Author: Paulo Motta Authored: Wed Jul 27 11:39:28 2016 -0400 Committer: Josh McKenzie Committed: Wed Jul 27 11:39:28 2016 -0400 ---------------------------------------------------------------------- conf/cassandra-env.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/247a56bc/conf/cassandra-env.ps1 ---------------------------------------------------------------------- diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index d7a4867..31c7766 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