summaryrefslogtreecommitdiffstats
path: root/policy-persistence/src/main/java
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-05-11 08:20:10 -0500
committerJorge Hernandez <jh1730@att.com>2017-05-11 08:48:27 -0500
commitf354096969e91aa2b3dcdc52adcc2bde1b3b0b74 (patch)
tree511e29b1bbafb0d3053b00a324fd3934786c8ccb /policy-persistence/src/main/java
parentb90795e142b490549db86a40007f3eab813bc67c (diff)
[POLICY-12] clean policy-persistence mod warnings
Takes care of the following warnings: --IntegrityAuditIntegrationTest.java import org.junit.Ignore is never used import org.openecomp.policy.common.im.AdministrativeStateException is never used import org.openecomp.policy.common.im.IntegrityMonitor is never used import org.openecomp.policy.common.im.StandbyStatusException is never used import org.openecomp.policy.drools.core.DroolsPDPIntegrityMonitor is never used import org.apache.commons.logging.Log is never used import org.apache.commons.logging.LogFactory is never used value of the field IntegrityAuditIntegrationTest.sleepTime is not used --IntegrityMonitorProperties.java import org.apache.commons.logging.Log is never used import org.apache.commons.logging.LogFactory is never used --StandbyStateManagementTest.java import org.openecomp.policy.drools.system.PolicyEngine is never --RepositoryAudit.java import java.nio.file.FileVisitor is never used import java.util.concurrent.Callable is never used --PMStandbyStateChangeNotifier.java import org.openecomp.policy.drools.controller.internal.MavenDroolsController is never used import org.openecomp.policy.drools.event.comm.TopicEndpoint is never used --DroolsSessionEntity.java The serializable class DroolsSessionEntity does not declare a static final serialVersionUID field of type long --DroolsPdpObject.java Comparable is a raw type. References to generic type Comparable<T> should be parameterized Comparable is a raw type. References to generic type Comparable<T> should be parameterized Type safety: The method compareTo(Object) belongs to the raw type Comparable. References to generic type Comparable<T> should be parameterized --DroolsPdpsElectionHandler.java The value of the local variable lowestPriorityPdp is not used Change-Id: Idd563d74c1d6521f7a3759c441f7fe0597011b67 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'policy-persistence/src/main/java')
-rw-r--r--policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java3
-rw-r--r--policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java6
-rw-r--r--policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java4
-rw-r--r--policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java2
-rw-r--r--policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java1
-rw-r--r--policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java3
6 files changed, 7 insertions, 12 deletions
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java
index d1b1ad6d..e0df4e63 100644
--- a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java
+++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java
@@ -22,9 +22,6 @@ package org.openecomp.policy.drools.core;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
import org.openecomp.policy.common.logging.flexlogger.Logger;
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java
index c4301364..76dadd9e 100644
--- a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java
+++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java
@@ -24,15 +24,13 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.nio.file.attribute.BasicFileAttributes;
-import java.nio.file.Files;
-import java.nio.file.FileVisitor;
import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
import java.util.LinkedList;
import java.util.Properties;
-import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java
index 363e43c4..30877995 100644
--- a/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java
+++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java
@@ -45,11 +45,9 @@ import java.util.TimerTask;
import org.openecomp.policy.common.im.StateChangeNotifier;
import org.openecomp.policy.common.im.StateManagement;
-import org.openecomp.policy.drools.controller.internal.MavenDroolsController;
-import org.openecomp.policy.drools.core.IntegrityMonitorProperties;
-import org.openecomp.policy.drools.event.comm.TopicEndpoint;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.openecomp.policy.drools.core.IntegrityMonitorProperties;
import org.openecomp.policy.drools.persistence.DroolsPdpsConnector;
import org.openecomp.policy.drools.persistence.PersistenceFeature;
import org.openecomp.policy.drools.system.PolicyEngine;
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java
index 7a219148..d9c2d48f 100644
--- a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java
+++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java
@@ -31,7 +31,7 @@ public abstract class DroolsPdpObject implements DroolsPdp{
return false;
}
}
- private int nullSafeCompare(Comparable one, Comparable two){
+ private int nullSafeCompare(String one, String two){
if(one != null && two != null){
return one.compareTo(two);
}
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java
index 40a8a56b..045c4c25 100644
--- a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java
+++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java
@@ -180,7 +180,6 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker {
Collection<DroolsPdp> pdps = pdpsConnector.getDroolsPdps();
DroolsPdp designatedPdp = null;
- DroolsPdp lowestPriorityPdp = null;
logger.debug
//System.out.println
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java
index 89e310f0..247f9c81 100644
--- a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java
+++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java
@@ -28,6 +28,9 @@ import javax.persistence.Id;
import javax.persistence.ManyToOne;
@Entity
public class DroolsSessionEntity implements Serializable, DroolsSession {
+
+ private static final long serialVersionUID = -5495057038819948709L;
+
@Id
@Column(name="pdpId", nullable=false)
private String pdpId="-1";