Skip to content

Commit

Permalink
Rename exception variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ctasada authored and Carlos Tasada committed May 14, 2024
1 parent aa2db76 commit cf87bf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gson/src/main/java/com/google/gson/ToNumberPolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public Number readNumber(JsonReader in) throws IOException, JsonParseException {
} else {
try {
return Long.parseLong(value);
} catch (NumberFormatException longE) {
} catch (NumberFormatException e) {
return parseAsDouble(value, in);
}
}
Expand All @@ -87,9 +87,9 @@ private Number parseAsDouble(String value, JsonReader in) throws IOException {
"JSON forbids NaN and infinities: " + d + "; at path " + in.getPreviousPath());
}
return d;
} catch (NumberFormatException doubleE) {
} catch (NumberFormatException e) {
throw new JsonParseException(
"Cannot parse " + value + "; at path " + in.getPreviousPath(), doubleE);
"Cannot parse " + value + "; at path " + in.getPreviousPath(), e);
}
}
},
Expand Down

0 comments on commit cf87bf0

Please sign in to comment.