groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] 01/02: fix unintended illegal access
Date Thu, 18 Apr 2019 12:19:44 GMT
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 <paulk@asert.com.au>
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()
     }


Mime
View raw message