Skip to content

Commit

Permalink
https://github.com/apache/dubbo/issues/12615
Browse files Browse the repository at this point in the history
Fixing the inconsistent thrown exceptions.
  • Loading branch information
tohidemyname committed Jul 6, 2023
1 parent 5176760 commit f2b7250
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public Object end(Object obj, boolean isValue) throws ParseException {
try {
return mConverter.readValue(mType, obj);
} catch (IOException e) {
throw new IllegalStateException(e.getMessage(), e);
throw new ParseException(e.getMessage());
}
}

Expand All @@ -248,7 +248,7 @@ public void objectBegin() throws ParseException {
try {
mValue = mType.newInstance();
} catch (Exception e) {
throw new IllegalStateException(e.getMessage(), e);
throw new ParseException(e.getMessage());
}
} else if (mType == ConcurrentMap.class) {
mValue = new ConcurrentHashMap<String, Object>();
Expand Down Expand Up @@ -339,7 +339,7 @@ public Object arrayEnd(int count) throws ParseException {
try {
items = (Collection<Object>) mType.newInstance();
} catch (Exception e) {
throw new IllegalStateException(e.getMessage(), e);
throw new ParseException(e.getMessage());
}
} else if (mType.isAssignableFrom(ArrayList.class)) { // List
items = new ArrayList<Object>(count);
Expand Down

0 comments on commit f2b7250

Please sign in to comment.