Skip to content

Commit ddbc562

Browse files
committed
do not throw an exception when init parse more than once, just issue a warning
1 parent e82808e commit ddbc562

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Parse/src/main/java/com/parse/ParsePlugins.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class ParsePlugins {
2626
private static final String INSTALLATION_ID_LOCATION = "installationId";
2727

2828
private static final Object LOCK = new Object();
29+
private static final String TAG = "com.parse.ParsePlugins";
2930
private static ParsePlugins instance;
3031

3132
// TODO(grantland): Move towards a Config/Builder parameter pattern to allow other configurations
@@ -37,7 +38,8 @@ static void initialize(Parse.Configuration configuration) {
3738
static void set(ParsePlugins plugins) {
3839
synchronized (LOCK) {
3940
if (instance != null) {
40-
throw new IllegalStateException("ParsePlugins is already initialized");
41+
PLog.w(TAG, "ParsePlugins is already initialized");
42+
return;
4143
}
4244
instance = plugins;
4345
}

0 commit comments

Comments
 (0)