Skip to content

Commit 14683af

Browse files
committed
simplified method isContinueInitOnError()
1 parent 505d8b4 commit 14683af

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

quickfixj-core/src/main/java/quickfix/mina/SessionConnector.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,15 +464,12 @@ public static void closeManagedSessionsAndDispose(IoService ioService, boolean a
464464
}
465465

466466
protected boolean isContinueInitOnError() {
467-
boolean continueInitOnError = false;
468-
if (settings.isSetting(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR)) {
469-
try {
470-
continueInitOnError = settings.getBool(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR);
471-
} catch (ConfigError | FieldConvertError ex) {
472-
// ignore and return default
473-
}
467+
try {
468+
return settings.getBoolOrDefault(SessionFactory.SETTING_CONTINUE_INIT_ON_ERROR, false);
469+
} catch (FieldConvertError | ConfigError ex) {
470+
// ignore and return default
474471
}
475-
return continueInitOnError;
472+
return false;
476473
}
477474

478475
}

0 commit comments

Comments
 (0)