Skip to content
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

Bump com.google.errorprone:error_prone_core from 2.20.0 to 2.21.1 #2463

Merged
merged 2 commits into from
Aug 8, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,11 @@ public InetAddress read(JsonReader in) throws IOException {
return null;
}
// regrettably, this should have included both the host name and the host address
return InetAddress.getByName(in.nextString());
// For compatibility, we use InetAddress.getByName rather than the possibly-better
// .getAllByName
@SuppressWarnings("AddressSelection")
InetAddress addr = InetAddress.getByName(in.nextString());
return addr;
}
@Override
public void write(JsonWriter out, InetAddress value) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void setUp() throws Exception {

@Test
public void testInetAddressSerializationAndDeserialization() throws Exception {
@SuppressWarnings("AddressSelection") // we really do want this method
InetAddress address = InetAddress.getByName("8.8.8.8");
String jsonAddress = gson.toJson(address);
assertThat(jsonAddress).isEqualTo("\"8.8.8.8\"");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.20.0</version>
<version>2.21.1</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down