Skip to content

Update com.google.errorprone and fix issues it flags. #2874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.38.0</version>
<version>2.39.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ public void testCustomDeserializerInvokedForPrimitives() {
boolean.class,
(JsonDeserializer<Boolean>) (json, type, context) -> json.getAsInt() != 0)
.create();
assertThat(gson.fromJson("1", boolean.class)).isEqualTo(Boolean.TRUE);
assertThat(gson.fromJson("true", Boolean.class)).isEqualTo(Boolean.TRUE);
assertThat(gson.fromJson("1", boolean.class)).isEqualTo(true);
assertThat(gson.fromJson("true", Boolean.class)).isEqualTo(true);
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion gson/src/test/java/com/google/gson/functional/MapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ public void testWriteMapsWithEmptyStringKey() {
public void testReadMapsWithEmptyStringKey() {
Map<String, Boolean> map =
gson.fromJson("{\"\":true}", new TypeToken<Map<String, Boolean>>() {}.getType());
assertThat(map.get("")).isEqualTo(Boolean.TRUE);
assertThat(map.get("")).isEqualTo(true);
}

/** From bug report http://code.google.com/p/google-gson/issues/detail?id=204 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1729,10 +1729,9 @@ public void testDeeplyNestedArrays() throws IOException {
@Test
public void testDeeplyNestedObjects() throws IOException {
// Build a JSON document structured like {"a":{"a":{"a":{"a":true}}}}, but 40 levels deep
String array = "{\"a\":%s}";
String json = "true";
for (int i = 0; i < 40; i++) {
json = String.format(array, json);
json = String.format("{\"a\":%s}", json);
}

JsonReader reader = new JsonReader(reader(json));
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.38.0</version>
<version>2.39.0</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down