Added @Override method

Added diamond symbol on RHS
Removed useless parentheses

Issue-ID: POLICY-239
Change-Id: I1c3360a9c7242ff0ee23ab5599352d36bdf8ad9c
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/OrderedServiceImpl.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/OrderedServiceImpl.java
index 88a5331..ee70a4b 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/OrderedServiceImpl.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/OrderedServiceImpl.java
@@ -67,7 +67,7 @@
 	  {
 		rebuildList();
 	  }
-	return(implementers);
+	return implementers;
   }
 
   /**
@@ -85,7 +85,7 @@
   public synchronized List<T> rebuildList()
   {
 	// build a list of all of the current implementors
-	List<T> tmp = new LinkedList<T>();
+	List<T> tmp = new LinkedList<>();
 	for (T service : serviceLoader)
 	  {
 		tmp.add((T)getSingleton(service));
@@ -95,6 +95,7 @@
 	// according to full class name.
 	Collections.sort(tmp, new Comparator<T>()
 					 {
+					   @Override
 					   public int compare(T o1, T o2)
 						 {
 						   int s1 = o1.getSequenceNumber();
@@ -120,7 +121,7 @@
 	// create an unmodifiable version of this list
 	implementers = Collections.unmodifiableList(tmp);
 	logger.info("***** OrderedServiceImpl implementers:\n {}", implementers);
-	return(implementers);
+	return implementers;
   }
 
   // use this to ensure that we only use one unique instance of each class
@@ -151,6 +152,6 @@
 		rval = service;
 		classToSingleton.put(service.getClass(), service);
 	  }
-	return(rval);
+	return rval;
   }
 }
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java
index 9cfe2ed..84043d8 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java
@@ -56,7 +56,7 @@
 
 		// load properties (may throw an IOException)
 		rval.load(fis);
-		return(rval);
+		return rval;
 	  }
 	finally
 	  {
@@ -75,7 +75,7 @@
    */
   static public Properties getProperties(String fileName) throws IOException
   {
-	return(getProperties(new File(fileName)));
+	return getProperties(new File(fileName));
   }
 
   /* ============================================================ */
@@ -87,6 +87,7 @@
    * This is the callback interface, used for sending notifications of
    * changes in the properties file.
    */
+  @FunctionalInterface
   public interface Listener
   {
 	/**
@@ -100,7 +101,7 @@
 
   // this table maps canonical file into a 'ListenerRegistration' instance
   static private HashMap<File, ListenerRegistration> registrations =
-	new HashMap<File, ListenerRegistration>();
+	new HashMap<>();
 
   /**
    * This is an internal class - one instance of this exists for each
@@ -141,7 +142,7 @@
 	  properties = getProperties(file);
 
 	  // no listeners yet
-	  listeners = new LinkedList<Listener>();
+	  listeners = new LinkedList<>();
 
 	  // add to static table, so this instance can be shared
 	  registrations.put(file, this);
@@ -163,6 +164,7 @@
 	  // create and schedule the timer task, so this is periodically polled
 	  timerTask = new TimerTask()
 		{
+		  @Override
 		  public void run()
 		  {
 			try
@@ -186,7 +188,7 @@
 	synchronized Properties addListener(Listener listener)
 	{
 	  listeners.add(listener);
-	  return((Properties)properties.clone());
+	  return (Properties)properties.clone();
 	}
 
 	/**
@@ -203,7 +205,7 @@
 	  // one is being removed.
 	  synchronized(registrations)
 		{
-		  if (listeners.size() == 0)
+		  if (listeners.isEmpty())
 			{
 			  timerTask.cancel();
 			  registrations.remove(file);
@@ -226,7 +228,7 @@
 		  // Save old set, and initial set of changed properties.
 		  Properties oldProperties = properties;
 		  HashSet<String> changedProperties =
-			new HashSet<String>(oldProperties.stringPropertyNames());
+			new HashSet<>(oldProperties.stringPropertyNames());
 
 		  // Fetch the list of listeners that we will potentially notify,
 		  // and the new properties. Note that this is in a 'synchronized'
@@ -259,7 +261,7 @@
 			}
 
 		  // 'changedProperties' should be correct at this point
-		  if (changedProperties.size() != 0)
+		  if (!changedProperties.isEmpty())
 			{
 			  // there were changes - notify everyone in 'listeners'
 			  for (final Listener notify : listeners)
@@ -269,12 +271,13 @@
 				  final Properties tmpProperties =
 					(Properties)(properties.clone());
 				  final HashSet<String> tmpChangedProperties =
-					new HashSet<String>(changedProperties);
+					new HashSet<>(changedProperties);
 
 				  // Do the notification in a separate thread, so blocking
 				  // won't cause any problems.
 				  new Thread()
 				  {
+					@Override
 					public void run()
 					{
 					  notify.propertiesChanged
@@ -309,7 +312,7 @@
 	if (listener == null)
 	  {
 		// no listener specified -- just fetch the properties
-		return(getProperties(file));
+		return getProperties(file);
 	  }
 
 	// Convert the file to a canonical form in order to avoid the situation
@@ -327,7 +330,7 @@
 			// a new registration is needed
 			reg = new ListenerRegistration(file);
 		  }
-		return(reg.addListener(listener));
+		return reg.addListener(listener);
 	  }
   }
 
@@ -350,7 +353,7 @@
   static public Properties getProperties(String fileName, Listener listener)
 	throws IOException
   {
-	return(getProperties(new File(fileName), listener));
+	return getProperties(new File(fileName), listener);
   }
 
   /**
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java
index ba00c57..d300058 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java
@@ -32,6 +32,9 @@
 public class ReflectionUtil {
 	
 	protected final static Logger logger = LoggerFactory.getLogger(ReflectionUtil.class);
+
+	private ReflectionUtil(){
+	}
 	
 	/**
 	 * returns (if exists) a class fetched from a given classloader
@@ -82,7 +85,7 @@
 	 * @return
 	 */
 	public static boolean isSubclass(Class<?> parent, Class<?> presumedSubclass) {		
-		return (parent.isAssignableFrom(presumedSubclass));
+		return parent.isAssignableFrom(presumedSubclass);
 	}
 
 }