You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "jeanouii (via GitHub)" <gi...@apache.org> on 2023/05/11 08:40:40 UTC

[GitHub] [johnzon] jeanouii commented on a diff in pull request #105: WIP fix(JOHNZON-397): protection against very slow BigDecimal to BigInteger conversion at large scale

jeanouii commented on code in PR #105:
URL: https://github.com/apache/johnzon/pull/105#discussion_r1190836441


##########
johnzon-core/src/test/java/org/apache/johnzon/core/JsonNumberTest.java:
##########
@@ -62,20 +64,62 @@ public void equals() {
     
     @Test(expected=ArithmeticException.class)
     public void testBigIntegerExact() {
-       
         JsonArray array = Json.createArrayBuilder().add(100.0200).build();
         array.getJsonNumber(0).bigIntegerValueExact();
-
-       
     }
-    
+
     @Test
     public void testBigInteger() {
-       
         JsonArray array = Json.createArrayBuilder().add(100.0200).build();
         Assert.assertEquals(new BigInteger("100"), array.getJsonNumber(0).bigIntegerValue());
+    }
+
+    @Test
+    public void testSlowBigIntegerConversion() {

Review Comment:
   It's right bellow



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@johnzon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org