Skip to content

Commit 94beabb

Browse files
committed
Add brackets to the 'if's
1 parent 8bcbeb5 commit 94beabb

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

src/main/java/rx/Notification.java

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,38 @@ 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()) {
200206
return false;
201-
if (hasValue() && !getValue().equals(notification.getValue()))
207+
}
208+
209+
if (hasValue() && !getValue().equals(notification.getValue())) {
202210
return false;
203-
if (hasThrowable() && !getThrowable().equals(notification.getThrowable()))
211+
}
212+
213+
if (hasThrowable() && !getThrowable().equals(notification.getThrowable())) {
204214
return false;
205-
if(!hasValue() && !hasThrowable() && notification.hasValue())
215+
}
216+
217+
if (!hasValue() && !hasThrowable() && notification.hasValue()) {
206218
return false;
207-
if(!hasValue() && !hasThrowable() && notification.hasThrowable())
219+
}
220+
221+
if (!hasValue() && !hasThrowable() && notification.hasThrowable()) {
208222
return false;
223+
}
209224

210225
return true;
211226
}

0 commit comments

Comments
 (0)