Skip to content

Commit

Permalink
Code Check
Browse files Browse the repository at this point in the history
  • Loading branch information
sathishk committed Mar 1, 2024
1 parent 37ee894 commit fc6fdd8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
12 changes: 3 additions & 9 deletions src/main/java/com/techatpark/sjson/core/NumberParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,12 @@ public static Number getNumber(
throws IOException {

final StringBuilder builder = new StringBuilder(TEN);
char character;
char character = (char) reader.read();

// Happy Case : Read AllDigits before . character
while ((character = (char) reader.read()) != ','
&& Character.isDigit(character)
&& character != '.'
&& character != '}'
&& character != ']'
&& character != 'e'
&& character != 'E'
&& !isSpace(character)) {
while (Character.isDigit(character)) {
builder.append(character);
character = (char) reader.read();
}

// Maybe a double ?!
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/samples/decimal-number.json

This file was deleted.

1 change: 0 additions & 1 deletion src/test/resources/samples/negative.json

This file was deleted.

1 change: 0 additions & 1 deletion src/test/resources/samples/number.json

This file was deleted.

0 comments on commit fc6fdd8

Please sign in to comment.