| .. | .. |
|---|
| 20 | 20 | import com.fasterxml.jackson.annotation.JsonInclude; |
|---|
| 21 | 21 | import com.fasterxml.jackson.annotation.JsonInclude.Include; |
|---|
| 22 | 22 | import com.fasterxml.jackson.annotation.JsonProperty; |
|---|
| 23 | +import com.google.common.base.Objects; |
|---|
| 23 | 24 | |
|---|
| 24 | 25 | /** |
|---|
| 25 | 26 | * Entity implementation class for Entity: application_metadata |
|---|
| .. | .. |
|---|
| 102 | 103 | if (!(obj instanceof ApplicationMetadata)) |
|---|
| 103 | 104 | return false; |
|---|
| 104 | 105 | ApplicationMetadata other = (ApplicationMetadata) obj; |
|---|
| 105 | | - return key.equals(other.key) && (application == null || application.equals(other.application)); |
|---|
| 106 | + return Objects.equal(key, other.key) && Objects.equal(application, other.application); |
|---|
| 106 | 107 | } |
|---|
| 107 | 108 | |
|---|
| 108 | 109 | @Override |
|---|
| 109 | 110 | public int hashCode() { |
|---|
| 110 | 111 | |
|---|
| 111 | | - return key.hashCode() + (application == null ? 0 : application.hashCode()); |
|---|
| 112 | + return (key == null ? 0 : key.hashCode()) + (application == null ? 0 : application.hashCode()); |
|---|
| 112 | 113 | } |
|---|
| 113 | 114 | |
|---|
| 114 | 115 | @Override |
|---|