Skip to content

Commit 1a4fce2

Browse files
committed
2020-08-25T01:35
1 parent e1f3f19 commit 1a4fce2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/shimizukenta/jsonhub/JsonHubJsonParser.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ public static JsonHubJsonParser getInstance() {
3030
public AbstractJsonHub parse(CharSequence cs) {
3131

3232
try {
33+
34+
String s = cs.toString();
35+
36+
if ( s.trim().isEmpty() ) {
37+
new JsonHubParseException("JSON is empty");
38+
}
39+
3340
return fromJson(cs.toString());
3441
}
3542
catch ( JsonHubIndexOutOfBoundsException | JsonHubNumberFormatException e ) {

0 commit comments

Comments
 (0)