Skip to content

Commit ea84006

Browse files
Merge pull request #302 from rgerasimen/patch-1
Update Observable.isInternalImplementation, get rid of NullPointerExcept...
2 parents cdcd75a + 59d6a57 commit ea84006

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3745,7 +3745,8 @@ private boolean isInternalImplementation(Object o) {
37453745
if (o instanceof AtomicObserver)
37463746
return true;
37473747
// we treat the following package as "internal" and don't wrap it
3748-
return o.getClass().getPackage().getName().startsWith("rx.operators");
3748+
Package p = o.getClass().getPackage(); // it can be null
3749+
return p != null && p.getName().startsWith("rx.operators");
37493750
}
37503751

37513752
public static class UnitTest {

0 commit comments

Comments
 (0)