aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/guard/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/guard/src/main')
-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]);