Skip to content

Commit 263a357

Browse files
committed
PR feedback
1 parent 3903013 commit 263a357

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/main/java/com/siftscience/UserScoreRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ protected HttpUrl path(HttpUrl baseUrl) {
5252
.addPathSegment(userSoreFieldSet.getUserId())
5353
.addPathSegment("score")
5454
.addQueryParameter("api_key", userSoreFieldSet.getApiKey());
55-
if (userSoreFieldSet.getAbuseTypes() != null && userSoreFieldSet.getAbuseTypes().size() > 0) {
55+
if (userSoreFieldSet.getAbuseTypes() != null
56+
&& !userSoreFieldSet.getAbuseTypes().isEmpty()) {
5657
String queryParamVal = "";
5758
for (String abuseType : userSoreFieldSet.getAbuseTypes()) {
5859
queryParamVal += (abuseType + ",");

src/main/java/com/siftscience/model/Decision.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.google.gson.annotations.Expose;
44
import com.google.gson.annotations.SerializedName;
55

6+
import java.util.Objects;
7+
68
public class Decision {
79
@Expose @SerializedName("id") private String id;
810
@Expose @SerializedName("category") private String category;
@@ -62,10 +64,10 @@ public boolean equals(Object other) {
6264
}
6365

6466
Decision o = (Decision) other;
65-
return getId().equals(o.getId())
66-
&& getCategory().equals(o.getCategory())
67+
return Objects.equals(getId(), o.getId())
68+
&& Objects.equals(getCategory(), o.getCategory())
6769
&& getTime() == o.getTime()
68-
&& getSource().equals(o.getSource())
69-
&& getDescription().equals(o.getDescription());
70+
&& Objects.equals(getSource(), o.getSource())
71+
&& Objects.equals(getDescription(), o.getDescription());
7072
}
7173
}

0 commit comments

Comments
 (0)