From 9d7c95aba1942f304639865d7cf6c87b7aa998a4 Mon Sep 17 00:00:00 2001 From: kapil-agnihotri Date: Fri, 18 Nov 2022 15:19:52 +0100 Subject: [PATCH] build: fix BigInteger failing test case Adding 1 to Long.MAX_VALUE results in `overflow` exception when converting BigInteger string into Long. So added an empty string instead of adding 1 ING-3267 --- .../hale/io/geopackage/GeopackageInstanceWriterTest.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io/plugins/eu.esdihumboldt.hale.io.geopackage.test/src/eu/esdihumboldt/hale/io/geopackage/GeopackageInstanceWriterTest.groovy b/io/plugins/eu.esdihumboldt.hale.io.geopackage.test/src/eu/esdihumboldt/hale/io/geopackage/GeopackageInstanceWriterTest.groovy index 99c0811c3a..b8b28af187 100644 --- a/io/plugins/eu.esdihumboldt.hale.io.geopackage.test/src/eu/esdihumboldt/hale/io/geopackage/GeopackageInstanceWriterTest.groovy +++ b/io/plugins/eu.esdihumboldt.hale.io.geopackage.test/src/eu/esdihumboldt/hale/io/geopackage/GeopackageInstanceWriterTest.groovy @@ -185,13 +185,13 @@ class GeopackageInstanceWriterTest { InstanceCollection instances = new InstanceBuilder(types: schema).createCollection { abc { - a((new BigInteger('123')).intValue()) + a(new BigInteger('123')) b(new BigDecimal('1.23')) } abc { - - a((new BigInteger('1' + Long.MAX_VALUE)).intValue()) + // it used to work with ('1' + Long.MAX_VALUE and it does no longer after java17 migration for an unknown reason + a(new BigInteger('' + Long.MAX_VALUE)) b(new BigDecimal('1098491071975459529.6201509049614540479')) } }