From commits-return-8326-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Thu Apr 18 12:19:44 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8B86C180789 for ; Thu, 18 Apr 2019 14:19:44 +0200 (CEST) Received: (qmail 85688 invoked by uid 500); 18 Apr 2019 12:19:43 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 85668 invoked by uid 99); 18 Apr 2019 12:19:43 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2019 12:19:43 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id BAFFF879DA; Thu, 18 Apr 2019 12:19:43 +0000 (UTC) Date: Thu, 18 Apr 2019 12:19:44 +0000 To: "commits@groovy.apache.org" Subject: [groovy] 01/02: fix unintended illegal access MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: paulk@apache.org In-Reply-To: <155558998359.9929.3343277618959856145@gitbox.apache.org> References: <155558998359.9929.3343277618959856145@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: groovy X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 6ef4a222d0e77d27a980aea6be9e5385f3f9b568 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190418121943.BAFFF879DA@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git commit 6ef4a222d0e77d27a980aea6be9e5385f3f9b568 Author: Paul King AuthorDate: Thu Apr 18 22:12:36 2019 +1000 fix unintended illegal access --- src/test/groovy/PrimitiveTypesTest.groovy | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/test/groovy/PrimitiveTypesTest.groovy b/src/test/groovy/PrimitiveTypesTest.groovy index eacd6d8..15cf1b7 100644 --- a/src/test/groovy/PrimitiveTypesTest.groovy +++ b/src/test/groovy/PrimitiveTypesTest.groovy @@ -21,35 +21,35 @@ package groovy class PrimitiveTypesTest extends GroovyTestCase { int getInt() { - return 1; + return 1 } short getShort() { - return 1; + return 1 } boolean getBoolean() { - return true; + return true } double getDouble() { - return 1.0; + return 1.0 } float getFloat() { - return 1.0; + return 1.0 } byte getByte() { - return 1; + return 1 } long getLong() { - return 1; + return 1 } char getChar() { - return 'a'; + return 'a' } int getNextInt(int i) { @@ -85,15 +85,14 @@ class PrimitiveTypesTest extends GroovyTestCase { } void testBigInteger2BigDecimal() { - BigInteger big = new BigInteger(Long.MAX_VALUE) + BigInteger big = BigInteger.valueOf(Long.MAX_VALUE) assert big.longValue() == testMethod(big).longValueExact() } private testMethod(BigDecimal bd) { - return bd; + return bd } - static void main(args) { new PrimitiveTypesTest().testPrimitiveTypes() }