Skip to content

Commit 6cbbef4

Browse files
author
Shivang Shah
committed
Making RxPlugins reset() public
Discussions found here: #2297 Adding @experimental tag because exposing reset() could be dangerous
1 parent e804172 commit 6cbbef4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/rx/plugins/RxJavaPlugins.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import java.util.*;
1919
import java.util.concurrent.atomic.AtomicReference;
20+
import rx.annotations.Experimental;
2021

2122
/**
2223
* Registry for plugin implementations that allows global override and handles the retrieval of correct
@@ -66,7 +67,9 @@ public static RxJavaPlugins getInstance() {
6667

6768
}
6869

69-
/* package accessible for unit tests */void reset() {
70+
/* publicly accessible per: https://github.com/ReactiveX/RxJava/issues/2297 */
71+
@Experimental
72+
public void reset() {
7073
INSTANCE.errorHandler.set(null);
7174
INSTANCE.observableExecutionHook.set(null);
7275
INSTANCE.singleExecutionHook.set(null);

0 commit comments

Comments
 (0)