summaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-11-06 06:57:50 -0500
committerJim Hahn <jrh3@att.com>2019-11-06 09:18:42 -0500
commit1221c6bcdba722996e74c991881db6e52e158d23 (patch)
tree791f3343aa90af1e9aee06e0c1a33cf70aca6e16 /feature-active-standby-management
parent4d7e396e00ef92364e3ea8dd6e35922dc5fae72c (diff)
Address drools-pdp sonar issues
Addressed more sonar issues in drools-pdp: - unwrap multiple instances of the same annotation (NamedQuery) - use lambda instead of anonymous class - duplicate code; addressed by using annotation instead of toString. This still leaves other duplicate code. Issue-ID: POLICY-2203 Change-Id: I8c6ff6562820af638044f134eb8a6725a5f05e8e Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-active-standby-management')
-rw-r--r--feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java
index 4175068f..078b0477 100644
--- a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java
+++ b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java
@@ -22,26 +22,21 @@ package org.onap.policy.drools.activestandby;
import java.io.Serializable;
import java.util.Date;
-
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
-import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import lombok.Getter;
import lombok.Setter;
import org.onap.policy.common.im.MonitorTime;
-import org.onap.policy.drools.activestandby.DroolsPdpObject;
@Entity
//@Table(name="DroolsPdpEntity")
-@NamedQueries({
- @NamedQuery(name = "DroolsPdpEntity.findAll", query = "SELECT e FROM DroolsPdpEntity e "),
- @NamedQuery(name = "DroolsPdpEntity.deleteAll", query = "DELETE FROM DroolsPdpEntity WHERE 1=1")
- })
+@NamedQuery(name = "DroolsPdpEntity.findAll", query = "SELECT e FROM DroolsPdpEntity e ")
+@NamedQuery(name = "DroolsPdpEntity.deleteAll", query = "DELETE FROM DroolsPdpEntity WHERE 1=1")
@Getter
@Setter
public class DroolsPdpEntity extends DroolsPdpObject implements Serializable {