Skip to content

Commit c8e1b03

Browse files
committed
1.x: make defensive copy of the properties in RxJavaPlugins
1 parent 3c86972 commit c8e1b03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ public void registerSingleExecutionHook(RxJavaSingleExecutionHook impl) {
200200
}
201201
}
202202

203-
/* test */ static Object getPluginImplementationViaProperty(Class<?> pluginClass, Properties props) {
203+
/* test */ static Object getPluginImplementationViaProperty(Class<?> pluginClass, Properties propsIn) {
204+
// Make a defensive clone because traversal may fail with ConcurrentModificationException
205+
// if the properties get changed by something outside RxJava.
206+
Properties props = (Properties)propsIn.clone();
207+
204208
final String classSimpleName = pluginClass.getSimpleName();
205209
/*
206210
* Check system properties for plugin class.

0 commit comments

Comments
 (0)