From 69a5e8cbacf46bec8014df10e381d0c2ed0361f4 Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Wed, 28 Oct 2026 23:18:34 +0000 Subject: [PATCH 1/3] chore: remove lombok dependency from parametermanager and run/idp-sql Remove unused org.projectlombok:lombok dependency and compiler annotation processor configuration from parametermanager/pom.xml. Remove org.projectlombok:lombok dependency from run/idp-sql/pom.xml. Update com.google.cloud:spring-cloud-gcp-dependencies from 3.7.7 to 3.9.18 in run/idp-sql/pom.xml so the sample builds and tests pass, as 3.7.7 is not available in our repo. --- parametermanager/pom.xml | 14 -------------- run/idp-sql/pom.xml | 10 +++------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/parametermanager/pom.xml b/parametermanager/pom.xml index 33cd5ffdc52..2da84f3a7e0 100644 --- a/parametermanager/pom.xml +++ b/parametermanager/pom.xml @@ -61,13 +61,6 @@ protobuf-java-util - - org.projectlombok - lombok - 1.18.30 - provided - - junit @@ -107,13 +100,6 @@ 11 11 - - - org.projectlombok - lombok - 1.18.30 - - diff --git a/run/idp-sql/pom.xml b/run/idp-sql/pom.xml index d65e9e30836..ace3adc10a5 100644 --- a/run/idp-sql/pom.xml +++ b/run/idp-sql/pom.xml @@ -47,7 +47,7 @@ limitations under the License. com.google.cloud spring-cloud-gcp-dependencies - 3.7.7 + 3.9.18 pom import @@ -108,12 +108,8 @@ limitations under the License. - org.projectlombok - lombok - - - com.squareup.okhttp3 - okhttp + com.squareup.okhttp3 + okhttp com.google.gms From 318efdae65f9a4c6e46eea381c74fa9ad9fbbf74 Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Fri, 30 Oct 2026 16:59:29 +0000 Subject: [PATCH 2/3] - Removed lombok decorators and created manual getters/setters. --- .../main/java/com/example/cloudrun/Vote.java | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java b/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java index 5c4af49c35d..fb92e4fad7f 100644 --- a/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java +++ b/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java @@ -19,15 +19,42 @@ import com.google.gson.JsonObject; import edu.umd.cs.findbugs.annotations.NonNull; import java.sql.Timestamp; -import lombok.Data; -/** Lombok notation to generate methods: toString, equals, hashCode, getters, and setters */ -@Data public class Vote { @NonNull private String uid; @NonNull private String candidate; @NonNull private Timestamp timeCast; + public Vote(String uid, String candidate, Timestamp timeCast) { + this.uid = uid; + this.candidate = candidate; + this.timeCast = timeCast; + } + + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getCandidate() { + return candidate; + } + + public void setCandidate(String candidate) { + this.candidate = candidate; + } + + public Timestamp getTimeCast() { + return timeCast; + } + + public void setTimeCast(Timestamp timeCast) { + this.timeCast = timeCast; + } + @Override public String toString() { JsonObject vote = new JsonObject(); From 56c606cec036ba6068becf0a1131f6f1534f82ee Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Fri, 30 Oct 2026 23:32:12 +0000 Subject: [PATCH 3/3] Added non null checks to constructor, getters, and setters. Added equals and hashCode methods. --- .../main/java/com/example/cloudrun/Vote.java | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java b/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java index fb92e4fad7f..8f3297eb792 100644 --- a/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java +++ b/run/idp-sql/src/main/java/com/example/cloudrun/Vote.java @@ -17,18 +17,18 @@ package com.example.cloudrun; import com.google.gson.JsonObject; -import edu.umd.cs.findbugs.annotations.NonNull; import java.sql.Timestamp; +import java.util.Objects; public class Vote { - @NonNull private String uid; - @NonNull private String candidate; - @NonNull private Timestamp timeCast; + private String uid; + private String candidate; + private Timestamp timeCast; public Vote(String uid, String candidate, Timestamp timeCast) { - this.uid = uid; - this.candidate = candidate; - this.timeCast = timeCast; + this.uid = Objects.requireNonNull(uid); + this.candidate = Objects.requireNonNull(candidate); + this.timeCast = Objects.requireNonNull(timeCast); } public String getUid() { @@ -36,7 +36,7 @@ public String getUid() { } public void setUid(String uid) { - this.uid = uid; + this.uid = Objects.requireNonNull(uid); } public String getCandidate() { @@ -44,7 +44,7 @@ public String getCandidate() { } public void setCandidate(String candidate) { - this.candidate = candidate; + this.candidate = Objects.requireNonNull(candidate); } public Timestamp getTimeCast() { @@ -52,7 +52,26 @@ public Timestamp getTimeCast() { } public void setTimeCast(Timestamp timeCast) { - this.timeCast = timeCast; + this.timeCast = Objects.requireNonNull(timeCast); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Vote vote = (Vote) o; + return Objects.equals(uid, vote.uid) + && Objects.equals(candidate, vote.candidate) + && Objects.equals(timeCast, vote.timeCast); + } + + @Override + public int hashCode() { + return Objects.hash(uid, candidate, timeCast); } @Override