Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions 46d6c3 ... vs d7fd17 ... for ruralHouses/src/domain/RuralHouse.java

Diff revisions: vs.
  @@ -82,6 +82,8 @@
82 82 return off;
83 83 }
84 84
85 +
86 +
85 87 @Override
86 88 public boolean equals(Object obj) {
87 89 if (this == obj)
  @@ -91,7 +93,10 @@
91 93 if (getClass() != obj.getClass())
92 94 return false;
93 95 RuralHouse other = (RuralHouse) obj;
94 - if (houseName != other.houseName)
96 + if (houseName == null) {
97 + if (other.houseName != null)
98 + return false;
99 + } else if (!houseName.equals(other.houseName))
95 100 return false;
96 101 return true;
97 102 }
  @@ -171,8 +176,5 @@
171 176
172 177 }
173 178
174 - public boolean equals(RuralHouse oRh) {
175 - return this.getHouseName().equals(oRh.getHouseName());
176 - }
177 179
178 180 }