Skip to content

Commit

Permalink
build: fix BigInteger failing test case
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kapil-agnihotri committed Nov 21, 2022
1 parent c4be00c commit 6f66a00
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
}
}
Expand Down

0 comments on commit 6f66a00

Please sign in to comment.