File tree Expand file tree Collapse file tree 4 files changed +10
-33
lines changed Expand file tree Collapse file tree 4 files changed +10
-33
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,7 @@ dependencies {
12
12
testCompile ' org.mockito:mockito-core:1.8.5'
13
13
}
14
14
15
+ javadoc {
16
+ exclude " **/rx/internal/**"
17
+ }
18
+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ public static RxJavaPlugins getInstance() {
55
55
INSTANCE .schedulersHook .set (null );
56
56
}
57
57
58
+ static final RxJavaErrorHandler DEFAULT_ERROR_HANDLER = new RxJavaErrorHandler () {
59
+ };
60
+
58
61
/**
59
62
* Retrieves an instance of {@link RxJavaErrorHandler} to use based on order of precedence as defined in
60
63
* {@link RxJavaPlugins} class header.
@@ -70,7 +73,7 @@ public RxJavaErrorHandler getErrorHandler() {
70
73
Object impl = getPluginImplementationViaProperty (RxJavaErrorHandler .class );
71
74
if (impl == null ) {
72
75
// nothing set via properties so initialize with default
73
- errorHandler .compareAndSet (null , RxJavaErrorHandlerDefault . getInstance () );
76
+ errorHandler .compareAndSet (null , DEFAULT_ERROR_HANDLER );
74
77
// we don't return from here but call get() again in case of thread-race so the winner will always get returned
75
78
} else {
76
79
// we received an implementation from the system property so use it
Original file line number Diff line number Diff line change 16
16
package rx .plugins ;
17
17
18
18
import static org .junit .Assert .assertEquals ;
19
+ import static org .junit .Assert .assertSame ;
19
20
import static org .junit .Assert .assertTrue ;
20
21
import static org .junit .Assert .fail ;
21
22
@@ -41,7 +42,7 @@ public void resetAfter() {
41
42
@ Test
42
43
public void testErrorHandlerDefaultImpl () {
43
44
RxJavaErrorHandler impl = new RxJavaPlugins ().getErrorHandler ();
44
- assertTrue ( impl instanceof RxJavaErrorHandlerDefault );
45
+ assertSame ( RxJavaPlugins . DEFAULT_ERROR_HANDLER , impl );
45
46
}
46
47
47
48
@ Test
You can’t perform that action at this time.
0 commit comments