Skip to content

Commit 988b42a

Browse files
committed
PR feedback
1 parent e764a7a commit 988b42a

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ EntityScoreResponse buildResponse(Response response, FieldSet requestFields)
4646
*/
4747
@Override
4848
protected HttpUrl path(HttpUrl baseUrl) {
49-
UserScoreFieldSet userSoreFieldSet = (UserScoreFieldSet)fieldSet;
49+
UserScoreFieldSet userScoreFieldSet = (UserScoreFieldSet)fieldSet;
5050
HttpUrl.Builder builder = baseUrl.newBuilder().addPathSegment("v205");
5151
builder.addPathSegment("users")
52-
.addPathSegment(userSoreFieldSet.getUserId())
52+
.addPathSegment(userScoreFieldSet.getUserId())
5353
.addPathSegment("score")
54-
.addQueryParameter("api_key", userSoreFieldSet.getApiKey());
55-
if (userSoreFieldSet.getAbuseTypes() != null && userSoreFieldSet.getAbuseTypes().size() > 0) {
54+
.addQueryParameter("api_key", userScoreFieldSet.getApiKey());
55+
if (userScoreFieldSet.getAbuseTypes() != null
56+
&& !userScoreFieldSet.getAbuseTypes().isEmpty()) {
5657
String queryParamVal = "";
57-
for (String abuseType : userSoreFieldSet.getAbuseTypes()) {
58+
for (String abuseType : userScoreFieldSet.getAbuseTypes()) {
5859
queryParamVal += (abuseType + ",");
5960
}
6061
builder.addQueryParameter("abuse_types",

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)