Skip to content

Commit ee1a843

Browse files
committed
Merge pull request #3474 from eug/patch-1
Fix indentation
2 parents 3e2b3b1 + 94beabb commit ee1a843

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

src/main/java/rx/Notification.java

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,24 +189,39 @@ public int hashCode() {
189189

190190
@Override
191191
public boolean equals(Object obj) {
192-
if (obj == null)
192+
if (obj == null) {
193193
return false;
194-
if (this == obj)
194+
}
195+
196+
if (this == obj) {
195197
return true;
196-
if (obj.getClass() != getClass())
198+
}
199+
200+
if (obj.getClass() != getClass()) {
197201
return false;
202+
}
203+
198204
Notification<?> notification = (Notification<?>) obj;
199-
if (notification.getKind() != getKind())
205+
if (notification.getKind() != getKind()) {
206+
return false;
207+
}
208+
209+
if (hasValue() && !getValue().equals(notification.getValue())) {
200210
return false;
201-
if (hasValue() && !getValue().equals(notification.getValue()))
211+
}
212+
213+
if (hasThrowable() && !getThrowable().equals(notification.getThrowable())) {
202214
return false;
203-
if (hasThrowable() && !getThrowable().equals(notification.getThrowable()))
215+
}
216+
217+
if (!hasValue() && !hasThrowable() && notification.hasValue()) {
204218
return false;
205-
if(!hasValue() && !hasThrowable() && notification.hasValue())
206-
return false;
207-
if(!hasValue() && !hasThrowable() && notification.hasThrowable())
208-
return false;
209-
219+
}
220+
221+
if (!hasValue() && !hasThrowable() && notification.hasThrowable()) {
222+
return false;
223+
}
224+
210225
return true;
211226
}
212227
}

0 commit comments

Comments
 (0)