@Test public void testErrorHandlerViaProperty() { try { RxJavaPlugins p = new RxJavaPlugins(); String fullClass = getFullClassNameForTestClass(RxJavaErrorHandlerTestImpl.class); System.setProperty("rxjava.plugin.RxJavaErrorHandler.implementation", fullClass); RxJavaErrorHandler impl = p.getErrorHandler(); assertTrue(impl instanceof RxJavaErrorHandlerTestImpl); } finally { System.clearProperty("rxjava.plugin.RxJavaErrorHandler.implementation"); } }
public RxJavaErrorHandler getErrorHandler() { if (errorHandler.get() == null) { Object impl = getPluginImplementationViaProperty(RxJavaErrorHandler.class); if (impl == null) { errorHandler.compareAndSet(null, RxJavaErrorHandlerDefault.getInstance()); } else { errorHandler.compareAndSet(null, (RxJavaErrorHandler) impl); } } return errorHandler.get(); }
RxJavaPlugins { public RxJavaErrorHandler getErrorHandler() { if (errorHandler.get() == null) { Object impl = getPluginImplementationViaProperty(RxJavaErrorHandler.class); if (impl == null) { errorHandler.compareAndSet(null, RxJavaErrorHandlerDefault.getInstance()); } else { errorHandler.compareAndSet(null, (RxJavaErrorHandler) impl); } } return errorHandler.get(); } }
RxJavaPlugins { public RxJavaErrorHandler getErrorHandler() { if (errorHandler.get() == null) { Object impl = getPluginImplementationViaProperty(RxJavaErrorHandler.class); if (impl == null) { errorHandler.compareAndSet(null, RxJavaErrorHandlerDefault.getInstance()); } else { errorHandler.compareAndSet(null, (RxJavaErrorHandler) impl); } } return errorHandler.get(); } RxJavaPlugins(); }
RxJavaPlugins { public RxJavaErrorHandler getErrorHandler() { if (errorHandler.get() == null) { Object impl = getPluginImplementationViaProperty(RxJavaErrorHandler.class); if (impl == null) { errorHandler.compareAndSet(null, RxJavaErrorHandlerDefault.getInstance()); } else { errorHandler.compareAndSet(null, (RxJavaErrorHandler) impl); } } return errorHandler.get(); } RxJavaPlugins(); static RxJavaPlugins getInstance(); RxJavaErrorHandler getErrorHandler(); void registerErrorHandler(RxJavaErrorHandler impl); RxJavaObservableExecutionHook getObservableExecutionHook(); void registerObservableExecutionHook(RxJavaObservableExecutionHook impl); }
RxJavaPlugins { public RxJavaErrorHandler getErrorHandler() { if (errorHandler.get() == null) { Object impl = getPluginImplementationViaProperty(RxJavaErrorHandler.class); if (impl == null) { errorHandler.compareAndSet(null, RxJavaErrorHandlerDefault.getInstance()); } else { errorHandler.compareAndSet(null, (RxJavaErrorHandler) impl); } } return errorHandler.get(); } RxJavaPlugins(); static RxJavaPlugins getInstance(); RxJavaErrorHandler getErrorHandler(); void registerErrorHandler(RxJavaErrorHandler impl); RxJavaObservableExecutionHook getObservableExecutionHook(); void registerObservableExecutionHook(RxJavaObservableExecutionHook impl);  }