Skip to content

Commit 411647c

Browse files
committed
Merge branch 'master' of https://github.com/json-iterator/java
2 parents 732312f + 7a3bfad commit 411647c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/main/java/com/jsoniter/IterImplForStreaming.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ public static final String readNumber(final JsonIterator iter) throws IOExceptio
543543
byte c = iter.buf[i];
544544
switch (c) {
545545
case '-':
546+
case '+':
546547
case '.':
547548
case 'e':
548549
case 'E':
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.jsoniter;
2+
3+
import junit.framework.TestCase;
4+
5+
public class IterImplForStreamingTest extends TestCase {
6+
7+
public void testReadMaxDouble() throws Exception {
8+
String maxDouble = "1.7976931348623157e+308";
9+
JsonIterator iter = JsonIterator.parse("1.7976931348623157e+308");
10+
String number = IterImplForStreaming.readNumber(iter);
11+
assertEquals(maxDouble, number);
12+
}
13+
}

0 commit comments

Comments
 (0)