You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/04/19 01:43:54 UTC

[groovy] 13/17: fix unintended illegal access

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ab951bba9e1849af7f86403f27cf39ccd992fc52
Author: Paul King <pa...@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()
     }