Skip to content

Commit 9b10529

Browse files
Make field final and remove unnecessary unboxing in OnSubscribeRedo.RetryWithPredicate
1 parent 84622bb commit 9b10529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/rx/internal/operators/OnSubscribeRedo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public Notification<?> call(Notification<?> terminalNotification) {
9898
}
9999

100100
public static final class RetryWithPredicate implements Func1<Observable<? extends Notification<?>>, Observable<? extends Notification<?>>> {
101-
private Func2<Integer, Throwable, Boolean> predicate;
101+
private final Func2<Integer, Throwable, Boolean> predicate;
102102

103103
public RetryWithPredicate(Func2<Integer, Throwable, Boolean> predicate) {
104104
this.predicate = predicate;
@@ -111,7 +111,7 @@ public Observable<? extends Notification<?>> call(Observable<? extends Notificat
111111
@Override
112112
public Notification<Integer> call(Notification<Integer> n, Notification<?> term) {
113113
final int value = n.getValue();
114-
if (predicate.call(value, term.getThrowable()).booleanValue())
114+
if (predicate.call(value, term.getThrowable()))
115115
return Notification.createOnNext(value + 1);
116116
else
117117
return (Notification<Integer>) term;

0 commit comments

Comments
 (0)