diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-28 04:58:26 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2018-10-01 10:28:44 -0400 |
commit | a0e0c7840f72392152a970d88a5a66d394c4a793 (patch) | |
tree | 1a1976844cb52020407b4d20e019f81ec25d5abf /feature-session-persistence/src/main/java | |
parent | 367f9d25434202a4fd6f5e54cb19196c7ec3d058 (diff) |
Set drools-pdp checkstyle config
Fixed last remaining checkstyle issues along with
setting the pom.xml to the correct path setting.
Fixed forbidden summary fragments, not allowed
to prepend summary with "This method returns"
Issue-ID: POLICY-1153
Change-Id: I267842080494132a7b5507731e14f027a3f6fe44
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'feature-session-persistence/src/main/java')
2 files changed, 33 insertions, 20 deletions
diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnector.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnector.java index 381a896e..b85a6854 100644 --- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnector.java +++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnector.java @@ -98,13 +98,13 @@ public class JpaDroolsSessionConnector implements DroolsSessionConnector { */ private boolean update(EntityManager em, DroolsSession sess) { - DroolsSessionEntity s = em.find(DroolsSessionEntity.class, sess.getSessionName()); - if (s == null) { + DroolsSessionEntity session = em.find(DroolsSessionEntity.class, sess.getSessionName()); + if (session == null) { return false; } logger.info("update: Updating session id to {}", sess.getSessionId()); - s.setSessionId(sess.getSessionId()); + session.setSessionId(sess.getSessionId()); return true; } 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 7b17de6c..332e2984 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 @@ -119,14 +119,16 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public int getSequenceNumber() { return 1; } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void globalInit(String[] args, String configDir) { @@ -160,7 +162,8 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public PolicySession.ThreadModel selectThreadModel(PolicySession session) { @@ -172,7 +175,8 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void disposeKieSession(PolicySession policySession) { @@ -184,7 +188,8 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void destroyKieSession(PolicySession policySession) { @@ -196,14 +201,16 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public boolean afterStart(PolicyEngine engine) { return false; } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public boolean beforeStart(PolicyEngine engine) { synchronized (cleanupLock) { @@ -214,7 +221,8 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public boolean beforeActivate(PolicyEngine engine) { synchronized (cleanupLock) { @@ -225,7 +233,8 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public boolean afterActivate(PolicyEngine engine) { return false; @@ -686,19 +695,21 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine return "Session " + session.getFullName() + " (persistent)"; } - /** ************************ */ + /*=========================*/ /* 'ThreadModel' interface */ - /** ************************ */ + /*=========================*/ /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void start() { thread.start(); } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void stop() { // tell the thread to stop @@ -720,19 +731,21 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine } /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void updated() { // the container artifact has been updated -- adjust the thread name thread.setName(getThreadName()); } - /** ********************* */ + /*======================*/ /* 'Runnable' interface */ - /** ********************* */ + /*======================*/ /** - * {@inheritDoc} */ + * {@inheritDoc}. + **/ @Override public void run() { logger.info("PersistentThreadModel running"); |