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 {
1212 testCompile ' org.mockito:mockito-core:1.8.5'
1313}
1414
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() {
5555 INSTANCE .schedulersHook .set (null );
5656 }
5757
58+ static final RxJavaErrorHandler DEFAULT_ERROR_HANDLER = new RxJavaErrorHandler () {
59+ };
60+
5861 /**
5962 * Retrieves an instance of {@link RxJavaErrorHandler} to use based on order of precedence as defined in
6063 * {@link RxJavaPlugins} class header.
@@ -70,7 +73,7 @@ public RxJavaErrorHandler getErrorHandler() {
7073 Object impl = getPluginImplementationViaProperty (RxJavaErrorHandler .class );
7174 if (impl == null ) {
7275 // nothing set via properties so initialize with default
73- errorHandler .compareAndSet (null , RxJavaErrorHandlerDefault . getInstance () );
76+ errorHandler .compareAndSet (null , DEFAULT_ERROR_HANDLER );
7477 // we don't return from here but call get() again in case of thread-race so the winner will always get returned
7578 } else {
7679 // we received an implementation from the system property so use it
Original file line number Diff line number Diff line change 1616package rx .plugins ;
1717
1818import static org .junit .Assert .assertEquals ;
19+ import static org .junit .Assert .assertSame ;
1920import static org .junit .Assert .assertTrue ;
2021import static org .junit .Assert .fail ;
2122
@@ -41,7 +42,7 @@ public void resetAfter() {
4142 @ Test
4243 public void testErrorHandlerDefaultImpl () {
4344 RxJavaErrorHandler impl = new RxJavaPlugins ().getErrorHandler ();
44- assertTrue ( impl instanceof RxJavaErrorHandlerDefault );
45+ assertSame ( RxJavaPlugins . DEFAULT_ERROR_HANDLER , impl );
4546 }
4647
4748 @ Test
You can’t perform that action at this time.
0 commit comments