You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/06/17 07:29:10 UTC
[groovy] branch danielsun/tweak-build updated: Fix illegal access
to private constructor of `BigInteger`
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun/tweak-build
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/danielsun/tweak-build by this push:
new 4e702dc Fix illegal access to private constructor of `BigInteger`
4e702dc is described below
commit 4e702dcd59ef47c4a67ccdc0973a6608b721b0ba
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Jun 17 15:28:22 2021 +0800
Fix illegal access to private constructor of `BigInteger`
---
src/test/org/codehaus/groovy/runtime/typehandling/NumberMathTest.groovy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/org/codehaus/groovy/runtime/typehandling/NumberMathTest.groovy b/src/test/org/codehaus/groovy/runtime/typehandling/NumberMathTest.groovy
index dbf0d6a..2c4a35f 100644
--- a/src/test/org/codehaus/groovy/runtime/typehandling/NumberMathTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/typehandling/NumberMathTest.groovy
@@ -109,7 +109,7 @@ class NumberMathTest extends GroovyTestCase {
def BD1 = new BigDecimal("1.0")
def BD2 = new BigDecimal("2.0")
def BD20 = new BigDecimal("2.00")
- def BD100 = new BigDecimal(new BigInteger(1), -2) // 100
+ def BD100 = new BigDecimal(new BigInteger("1"), -2) // 100
assert I1 / I2 instanceof BigDecimal
assert I1 / I2 == new BigDecimal("0.5")