summaryrefslogtreecommitdiffstats
path: root/controlloop/common/guard
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-09-18 13:52:01 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-18 13:52:01 +0000
commitb8eddc08d2653e6812d3f30eb3d503680ba131f1 (patch)
treed3aedc7965014f256f39c8f483de737fb69a264a /controlloop/common/guard
parent49137f3c5ecd0a3c2fbc7e9195ef18aa5b43fc11 (diff)
parent35c04a15d76d002d5cbc719dc855a15c4a84b962 (diff)
Merge "Fix sonar critical"
Diffstat (limited to 'controlloop/common/guard')
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
index afb847e09..9ee6f2310 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
@@ -59,9 +59,19 @@ import com.att.research.xacml.std.pip.engines.StdConfigurableEngine;
public class PIPEngineGetHistory extends StdConfigurableEngine{
+
private interface DateUtil{
+ public class DateUtilException extends Exception {
+ private static final long serialVersionUID = 2612662650481443076L;
+
+ public DateUtilException(String message) {
+ super(message);
+ }
+
+ }
+
public long getMs();
- public DateUtil init(String sqlValUnit) throws Exception;
+ public DateUtil init(String sqlValUnit) throws DateUtilException;
}
private static final Logger logger = LoggerFactory.getLogger(PIPEngineGetHistory.class);
@@ -338,10 +348,10 @@ public class PIPEngineGetHistory extends StdConfigurableEngine{
private double multiplier = 0;
@Override
- public DateUtil init(String sqlValUnit) throws Exception{
+ public DateUtil init(String sqlValUnit) throws DateUtilException{
String[] split = sqlValUnit.split(" ");
if(split.length != 2){
- throw new Exception("Invalid Value Unit pair for SQL");
+ throw new DateUtilException("Invalid Value Unit pair for SQL");
}
ms = Long.parseLong(split[0]);