Skip to content

Commit 6c3cf22

Browse files
authored
Unnecessary unboxing at JsonPrimitive.getAsBoolean() (#2277)
1 parent 0a42c31 commit 6c3cf22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gson/src/main/java/com/google/gson/JsonPrimitive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public boolean isBoolean() {
104104
@Override
105105
public boolean getAsBoolean() {
106106
if (isBoolean()) {
107-
return ((Boolean) value).booleanValue();
107+
return (Boolean) value;
108108
}
109109
// Check to see if the value as a String is "true" in any case.
110110
return Boolean.parseBoolean(getAsString());

0 commit comments

Comments
 (0)