diff options
author | rama-huawei <rama.subba.reddy.s@huawei.com> | 2017-09-21 15:40:11 +0530 |
---|---|---|
committer | Rama SubbaReddy <rama.subba.reddy.s@huawei.com> | 2017-09-21 12:54:22 +0000 |
commit | 5a8fe222ebc4485fae7e78be8e9926d6e51ac93a (patch) | |
tree | 8970a016cae1db773b0f778c800ee65f3ed481a1 /feature-session-persistence/src/main/java/org/onap | |
parent | 5a928151f308602fb091a728c739c0aea2106c8b (diff) |
Added @Override method
Added diamond symbol on RHS
Removed useless parentheses
Issue-ID: POLICY-239
Change-Id: Ie20319a5a7298c70a18cc3773ec47f235dbdae41
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'feature-session-persistence/src/main/java/org/onap')
2 files changed, 18 insertions, 17 deletions
diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java index 71f5ec9a..e9c5b33b 100644 --- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java +++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java @@ -91,22 +91,23 @@ public class DroolsSessionEntity implements Serializable, DroolsSession { public void setSessionId(long sessionId) { this.sessionId = sessionId; } - + + @Override public Date getCreatedDate() { return createdDate; } - + @Override public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } - + @Override public Date getUpdatedDate() { return updatedDate; } - + @Override public void setUpdatedDate(Date updatedDate) { this.updatedDate = updatedDate; } diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java index b48690b0..db33d05a 100644 --- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java +++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java @@ -143,7 +143,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine policyContainer.setAdjunct(this, rval); } - return ((ContainerAdjunct) rval); + return (ContainerAdjunct) rval; } /** @@ -151,7 +151,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine */ @Override public int getSequenceNumber() { - return (1); + return 1; } /** @@ -201,9 +201,9 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine public PolicySession.ThreadModel selectThreadModel(PolicySession session) { PolicyContainer policyContainer = session.getPolicyContainer(); if (isPersistenceEnabled(policyContainer, session.getName())) { - return (new PersistentThreadModel(session, getProperties(policyContainer))); + return new PersistentThreadModel(session, getProperties(policyContainer)); } - return (null); + return null; } /** @@ -372,8 +372,8 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine KieSessionConfiguration kConf = kieSvcFact.newKieSessionConfiguration(); - KieSession kieSession = (desiredSessionId >= 0 ? loadKieSession(kieBaseName, desiredSessionId, env, kConf) - : null); + KieSession kieSession = desiredSessionId >= 0 ? loadKieSession(kieBaseName, desiredSessionId, env, kConf) + : null; if (kieSession == null) { // loadKieSession() returned null or desiredSessionId < 0 @@ -609,7 +609,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine */ private long getSessionId(DroolsSessionConnector conn, String sessnm) { DroolsSession sess = conn.get(sessnm); - return (sess != null ? sess.getSessionId() : -1); + return sess != null ? sess.getSessionId() : -1; } /** @@ -650,10 +650,10 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine if (properties != null) { // fetch the 'type' property String type = getProperty(properties, sessionName, "type"); - rval = ("auto".equals(type) || "native".equals(type)); + rval = "auto".equals(type) || "native".equals(type); } - return (rval); + return rval; } /** @@ -665,10 +665,10 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine */ private Properties getProperties(PolicyContainer container) { try { - return (fact.getPolicyContainer(container).getProperties()); + return fact.getPolicyContainer(container).getProperties(); } catch (IllegalArgumentException e) { logger.error("getProperties exception: ", e); - return (null); + return null; } } @@ -694,7 +694,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine value = properties.getProperty("persistence." + property); } - return (value); + return value; } /* ============================================================ */ @@ -790,7 +790,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine * @return the String to use as the thread name */ private String getThreadName() { - return ("Session " + session.getFullName() + " (persistent)"); + return "Session " + session.getFullName() + " (persistent)"; } /***************************/ |