Merge "Added @Override method"
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));
 		}