summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/config/SynchronizerConfiguration.java9
-rw-r--r--src/test/java/org/onap/aai/sparky/SparkyPojoTest.java2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/config/SynchronizerConfiguration.java b/src/main/java/org/onap/aai/sparky/synchronizer/config/SynchronizerConfiguration.java
index 3e4afff..a556dc7 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/config/SynchronizerConfiguration.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/config/SynchronizerConfiguration.java
@@ -24,6 +24,7 @@ package org.onap.aai.sparky.synchronizer.config;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
+import java.text.ParseException;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
@@ -70,12 +71,12 @@ public class SynchronizerConfiguration {
/**
* Instantiates a new synchronizer configuration.
*/
- public SynchronizerConfiguration() throws NumberFormatException,PatternSyntaxException,Exception {
+ public SynchronizerConfiguration() throws NumberFormatException,PatternSyntaxException,ParseException {
Properties props = ConfigHelper.loadConfigFromExplicitPath(CONFIG_FILE);
initialize(props);
}
- public SynchronizerConfiguration(Properties props) throws NumberFormatException, PatternSyntaxException, Exception {
+ public SynchronizerConfiguration(Properties props) throws NumberFormatException, PatternSyntaxException, ParseException {
initialize(props);
}
/**
@@ -83,7 +84,7 @@ public class SynchronizerConfiguration {
*
* @throws Exception the exception
*/
- protected void initialize(Properties props) throws NumberFormatException, PatternSyntaxException, Exception {
+ protected void initialize(Properties props) throws NumberFormatException, PatternSyntaxException, ParseException {
// parse config for startup sync
try {
@@ -145,7 +146,7 @@ public class SynchronizerConfiguration {
} else {
LOG.info(AaiUiMsgs.SYNC_START_TIME);
}
- } catch (Exception exc) {
+ } catch (ParseException exc) {
this.setConfigOkForPeriodicSync(false);
String message = "Invalid configuration for synchronizer parameter:"
+ " 'synchronizer.syncTask.startTimestamp'";
diff --git a/src/test/java/org/onap/aai/sparky/SparkyPojoTest.java b/src/test/java/org/onap/aai/sparky/SparkyPojoTest.java
index 5d3900d..ce50718 100644
--- a/src/test/java/org/onap/aai/sparky/SparkyPojoTest.java
+++ b/src/test/java/org/onap/aai/sparky/SparkyPojoTest.java
@@ -144,7 +144,7 @@ public void validateSynchronizer(){
new FilterByContainsClassName("AutosuggestionSynchronizer"),new FilterByContainsClassName("CrossEntityReferenceSynchronizer"),
new FilterByContainsClassName("SyncController"),new FilterByContainsClassName("SyncHelper"),
new FilterByContainsClassName("TransactionRateController"),new FilterByContainsClassName("AggregationSuggestionSynchronizer"),
- new FilterByContainsClassName("AbstractEntitySynchronizer"));
+ new FilterByContainsClassName("AbstractEntitySynchronizer"),new FilterByContainsClassName("SynchronizerConfiguration"));
synchronizerPojoClasses = PojoClassFactory.getPojoClassesRecursively(packageName,filterChainByClassNameForSynchronizer);
validateAll(synchronizerPojoClasses);
}