Skip to content

Commit

Permalink
Jackson requires getters?!?
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Feb 1, 2014
1 parent c6009f4 commit 7e370b2
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,15 @@ public MyObject(@JsonProperty("message") String message, @JsonProperty("count")
this.count = count;
}

@Override
public boolean equals(Object o) {
public String getMessage() {
return message;
}

public int getCount() {
return count;
}

@Override public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

Expand All @@ -65,8 +72,7 @@ public boolean equals(Object o) {
&& !(message != null ? !message.equals(myObject.message) : myObject.message != null);
}

@Override
public int hashCode() {
@Override public int hashCode() {
int result = message != null ? message.hashCode() : 0;
result = 31 * result + count;
return result;
Expand Down

0 comments on commit 7e370b2

Please sign in to comment.