Skip to content
Permalink
Browse files
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
  • Loading branch information
cryptearth committed Feb 24, 2020
1 parent bec568d commit 1f662224d7bee6e27e8d66975fda39feae0c9359
Showing with 1 addition and 1 deletion.
  1. +1 −1 google-http-client/src/main/java/com/google/api/client/json/JsonParser.java
@@ -717,7 +717,7 @@ private final Object parseValue(
// value type is now null, class, parameterized type, or generic array type
JsonToken token = getCurrentToken();
try {
switch (getCurrentToken()) {
switch (token) {
case START_ARRAY:
case END_ARRAY:
boolean isArray = Types.isArray(valueType);

0 comments on commit 1f66222

Please sign in to comment.