Skip to content

Commit 1f66222

Browse files
author
cryptearth
authored
fix: reuse reference instead of calling getter twice (#983)
fix for #982 changed switch parameter in parseValue from calling getCurrentToken() again to just declared and assigned local member "token" two lines above
1 parent bec568d commit 1f66222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google-http-client/src/main/java/com/google/api/client/json/JsonParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ private final Object parseValue(
717717
// value type is now null, class, parameterized type, or generic array type
718718
JsonToken token = getCurrentToken();
719719
try {
720-
switch (getCurrentToken()) {
720+
switch (token) {
721721
case START_ARRAY:
722722
case END_ARRAY:
723723
boolean isArray = Types.isArray(valueType);

0 commit comments

Comments
 (0)