Repository: googleapis/java-datastore
Pull request #1329 (2024-02-07 19:13:17)

test(deps): upgrade errorprone to 2.24.0 (#1271)
* deps: upgrade errorprone to 2.24.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

cherry pick of #1271 



Patch:
diff --git a/google-cloud-datastore/pom.xml b/google-cloud-datastore/pom.xml
index d4231575..3f13224d 100644
--- a/google-cloud-datastore/pom.xml
+++ b/google-cloud-datastore/pom.xml
@@ -118,6 +118,13 @@
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
+
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava-testlib</artifactId>
+      <version>33.0.0-jre</version>
+      <scope>test</scope>
+    </dependency>
     <!-- Need testing utility classes for generated gRPC clients tests -->
     <dependency>
       <groupId>com.google.api</groupId>
diff --git a/pom.xml b/pom.xml
index ebd6fab8..27bb3600 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,7 +143,7 @@
     <github.global.server>github</github.global.server>
     <site.installationModule>google-cloud-datastore-parent</site.installationModule>
     <project.javadoc.protobufBaseURL>https://googleapis.dev/java/google-api-grpc/latest</project.javadoc.protobufBaseURL>
-    <error-prone.version>2.23.0</error-prone.version>
+    <error-prone.version>2.24.0</error-prone.version>
   </properties>
 
   <dependencyManagement>
@@ -237,7 +237,7 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-compiler-plugin</artifactId>
-            <version>3.11.0</version>
+            <version>3.12.1</version>
             <configuration>
               <encoding>UTF-8</encoding>
               <fork>true</fork>


Test patch:
diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/BlobTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/BlobTest.java
index 55d5f031..391f6f76 100644
--- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/BlobTest.java
+++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/BlobTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 
+import com.google.common.testing.EqualsTester;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
@@ -46,7 +47,8 @@ public class BlobTest {
 
   @Test
   public void testEquals() {
-    assertEquals(blob1, blob1);
+    EqualsTester equalsTester = new EqualsTester();
+    equalsTester.addEqualityGroup(blob1, blob1).testEquals();
     assertEquals(blob1, Blob.copyFrom(bytes1));
     assertNotEquals(blob1, blob2);
   }
diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/LatLngTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/LatLngTest.java
index e8076eba..9363fc15 100644
--- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/LatLngTest.java
+++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/LatLngTest.java
@@ -19,6 +19,7 @@ package com.google.cloud.datastore;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 
+import com.google.common.testing.EqualsTester;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -40,7 +41,8 @@ public class LatLngTest {
 
   @Test
   public void testEquals() {
-    assertEquals(gp1, gp1);
+    EqualsTester equalsTester = new EqualsTester();
+    equalsTester.addEqualityGroup(gp1, gp1).testEquals();
     assertNotEquals(gp1, gp2);
   }