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 71f5ec9..e9c5b33 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 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 b48690b..db33d05 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 @@
 			policyContainer.setAdjunct(this, rval);
 		}
 
-		return ((ContainerAdjunct) rval);
+		return (ContainerAdjunct) rval;
 	}
 
 	/**
@@ -151,7 +151,7 @@
 	 */
 	@Override
 	public int getSequenceNumber() {
-		return (1);
+		return 1;
 	}
 
 	/**
@@ -201,9 +201,9 @@
 	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 @@
 
 			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 @@
 	 */
 	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 @@
 		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 @@
 	 */
 	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 @@
 			value = properties.getProperty("persistence." + property);
 		}
 
-		return (value);
+		return value;
 	}
 
 	/* ============================================================ */
@@ -790,7 +790,7 @@
 		 * @return the String to use as the thread name
 		 */
 		private String getThreadName() {
-			return ("Session " + session.getFullName() + " (persistent)");
+			return "Session " + session.getFullName() + " (persistent)";
 		}
 
 		/***************************/
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java
index 762f447..6f14076 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java
@@ -670,13 +670,13 @@
 	 * and consequently the second value will be the less likely.
 	 */
 	protected final HashMap<String, Pair<ProtocolCoderToolset,ProtocolCoderToolset>> coders = 
-			new HashMap<String, Pair<ProtocolCoderToolset,ProtocolCoderToolset>>();
+			new HashMap<>();
 	
 	/**
 	 * Mapping topic + classname -> Protocol Set 
 	 */
 	protected final HashMap<String, List<Pair<ProtocolCoderToolset,ProtocolCoderToolset>>> reverseCoders = 
-			new HashMap<String, List<Pair<ProtocolCoderToolset,ProtocolCoderToolset>>>();
+			new HashMap<>();
 	
 	protected boolean multipleToolsetRetries = false;
 	
@@ -735,7 +735,7 @@
 							    this, reverseKey, key, toolsets.first());
 					
 					List<Pair<ProtocolCoderToolset,ProtocolCoderToolset>> reverseMappings =
-							new ArrayList<Pair<ProtocolCoderToolset,ProtocolCoderToolset>>();
+							new ArrayList<>();
 					reverseMappings.add(toolsets);
 					reverseCoders.put(reverseKey, reverseMappings);
 				}
@@ -767,7 +767,7 @@
 			// are detected in the gson encoding
 			
 			Pair<ProtocolCoderToolset,ProtocolCoderToolset> coderTools = 
-					new Pair<ProtocolCoderToolset,ProtocolCoderToolset>(gsonCoderTools, 
+					new Pair<>(gsonCoderTools, 
 							                                            jacksonCoderTools);
 			
 			logger.info("{}: adding coders for new {}: {}", this, key, coderTools.first());
@@ -800,7 +800,7 @@
 				}
 			} else {
 				List<Pair<ProtocolCoderToolset,ProtocolCoderToolset>> toolsets =
-					new ArrayList<Pair<ProtocolCoderToolset,ProtocolCoderToolset>>();
+					new ArrayList<>();
 				toolsets.add(coderTools);
 				
 				logger.info("{}: adding toolset for reverse key {}: {}", this, reverseKey, toolsets);
@@ -909,7 +909,7 @@
 		
 		String key = this.codersKey(groupId, artifactId, topic);
 		synchronized(this) {
-			return (coders.containsKey(key));
+			return coders.containsKey(key);
 		}
 	}
 	
@@ -1102,7 +1102,7 @@
 	protected List<DroolsController> droolsCreators(String topic, Object encodedClass)
 			throws IllegalStateException, IllegalArgumentException {
 		
-		List<DroolsController> droolsControllers = new ArrayList<DroolsController>();
+		List<DroolsController> droolsControllers = new ArrayList<>();
 		
 		String reverseKey = this.reverseCodersKey(topic, encodedClass.getClass().getCanonicalName());
 		if (!this.reverseCoders.containsKey(reverseKey)) {
@@ -1127,8 +1127,8 @@
 			// figure out the right toolset
 			String groupId = encoderSet.first().getGroupId();
 			String artifactId = encoderSet.first().getArtifactId();
-			List<CoderFilters> coders = encoderSet.first().getCoders();
-			for (CoderFilters coder : coders) {
+			List<CoderFilters> coderFilters = encoderSet.first().getCoders();
+			for (CoderFilters coder : coderFilters) {
 				if (coder.getCodedClass().equals(encodedClass.getClass().getCanonicalName())) {
 					DroolsController droolsController = 
 							DroolsController.factory.get(groupId, artifactId, "");
@@ -1206,7 +1206,7 @@
 		
 		String key = this.codersKey(groupId, artifactId, "");
 		
-		List<CoderFilters> codersFilters = new ArrayList<CoderFilters>();
+		List<CoderFilters> codersFilters = new ArrayList<>();
 		for (Map.Entry<String, Pair<ProtocolCoderToolset,ProtocolCoderToolset>> entry : coders.entrySet()) {
 			if (entry.getKey().startsWith(key)) {
 				codersFilters.addAll(entry.getValue().first().getCoders());
@@ -1235,7 +1235,7 @@
 		
 		String key = this.codersKey(groupId, artifactId, "");
 		
-		List<Pair<ProtocolCoderToolset,ProtocolCoderToolset>> coderToolset = new ArrayList<Pair<ProtocolCoderToolset,ProtocolCoderToolset>>();
+		List<Pair<ProtocolCoderToolset,ProtocolCoderToolset>> coderToolset = new ArrayList<>();
 		for (Map.Entry<String, Pair<ProtocolCoderToolset,ProtocolCoderToolset>> entry : coders.entrySet()) {
 			if (entry.getKey().startsWith(key)) {
 				coderToolset.add(entry.getValue());
@@ -1293,12 +1293,12 @@
 			throw new IllegalArgumentException("No Coder found for " + key);
 		
 		
-		List<CoderFilters> coders = new ArrayList<CoderFilters>();
+		List<CoderFilters> coderFilters = new ArrayList<>();
 		for (Pair<ProtocolCoderToolset,ProtocolCoderToolset> toolset: toolsets) {
-			coders.addAll(toolset.first().getCoders());
+			coderFilters.addAll(toolset.first().getCoders());
 		}
 		
-		return coders;
+		return coderFilters;
 	}
 	
 	/**
@@ -1390,4 +1390,4 @@
 		builder.append("EventProtocolEncoder [toString()=").append(super.toString()).append("]");
 		return builder.toString();
 	}
-}
\ No newline at end of file
+}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/JsonProtocolFilter.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/JsonProtocolFilter.java
index 6afeb26..0a52d25 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/JsonProtocolFilter.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/JsonProtocolFilter.java
@@ -119,7 +119,7 @@
 	/**
 	 * all the filters to be applied
 	 */
-	protected List<FilterRule> rules = new ArrayList<FilterRule>();
+	protected List<FilterRule> rules = new ArrayList<>();
 	
 	/**
 	 * 
@@ -134,7 +134,7 @@
 			throw new IllegalArgumentException("No raw filters provided");
 		}
 		
-		List<FilterRule> filters = new ArrayList<FilterRule>();
+		List<FilterRule> filters = new ArrayList<>();
 		for (Pair<String, String> filterPair: rawFilters) {
 			if  (filterPair.first() == null || filterPair.first().isEmpty()) {
 				continue;
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolset.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolset.java
index 1c8dafe..df51473 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolset.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolset.java
@@ -87,7 +87,7 @@
 	/**
 	 * Protocols and associated Filters
 	 */
-	protected final List<CoderFilters> coders = new ArrayList<CoderFilters>();
+	protected final List<CoderFilters> coders = new ArrayList<>();
 	
 	/**
 	 * Tree model (instead of class model) generic parsing to be able to inspect elements
@@ -488,7 +488,7 @@
 	 * Adapter for ZonedDateTime
 	 */
 	public static class GsonUTCAdapter implements JsonSerializer<ZonedDateTime>, JsonDeserializer<ZonedDateTime> {
-
+		@Override
 		public ZonedDateTime deserialize(JsonElement element, Type type, JsonDeserializationContext context)
 				throws JsonParseException {
 			try {
@@ -500,6 +500,7 @@
 			return null;
 		}
 
+		@Override
 		public JsonElement serialize(ZonedDateTime datetime, Type type, JsonSerializationContext context) {
 			return new JsonPrimitive(datetime.format(format));
 		}	
