Polish "Refactor BasicJsonParser to simplify JSON parsing logic"
See gh-41876
This commit is contained in:
parent
4a41006ee0
commit
66a41db079
|
@ -93,11 +93,11 @@ public class BasicJsonParser extends AbstractJsonParser {
|
||||||
try {
|
try {
|
||||||
return Long.valueOf(json);
|
return Long.valueOf(json);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e) {
|
catch (NumberFormatException ex) {
|
||||||
try {
|
try {
|
||||||
return Double.valueOf(json);
|
return Double.valueOf(json);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ex) {
|
catch (NumberFormatException ex2) {
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue