Removed useless parentheses

Added diamond symbol on RHS

Issue-ID: POLICY-239
Change-Id: I24c138703047308c2e28fef2180a0bb64400c1c9
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java
index 2dc2e26..3b7410f 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java
@@ -87,62 +87,62 @@
 	if (resourceName == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'resource.name'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'resource.name'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'resource.name'");
 	  }
 	if (hostPort == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'hostPort'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'hostPort'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'hostPort'");
 	  }
 	if (fpMonitorInterval == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'fp_monitor_interval'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'fp_monitor_interval'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'fp_monitor_interval'");
 	  }	
 	if (failedCounterThreshold == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'failed_counter_threshold'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'failed_counter_threshold'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'failed_counter_threshold'");
 	  }	
 	if (testTransInterval == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'test_trans_interval'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'test_trans_interval'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'test_trans_interval'");
 	  }	
 	if (writeFpcInterval == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'write_fpc_interval'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'write_fpc_interval'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'write_fpc_interval'");
 	  }	
 	if (siteName == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'site_name'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'site_name'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'site_name'");
 	  }	
 	if (nodeType == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'node_type'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'node_type'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'node_type'");
 	  }	
 	if (dependencyGroups == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'dependency_groups'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'dependency_groups'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'dependency_groups'");
 	  }	
 	if (javaxPersistenceJdbcDriver == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'javax.persistence.jbdc.driver for xacml DB'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'javax.persistence.jbdc.driver for xacml DB'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'javax.persistence.jbdc.driver for xacml DB'");
 	  }		
 	if (javaxPersistenceJdbcUrl == null)
 	  {
@@ -153,14 +153,14 @@
 	if (javaxPersistenceJdbcUser == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'javax.persistence.jbdc.user for xacml DB'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'javax.persistence.jbdc.user for xacml DB'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'javax.persistence.jbdc.user for xacml DB'");
 	  }			
 	if (javaxPersistenceJdbcPassword == null)
 	  {
 		logger.error("init: Missing IntegrityMonitor property: 'javax.persistence.jbdc.password for xacml DB'");
-		throw(new Exception
-			  ("Missing IntegrityMonitor property: 'javax.persistence.jbdc.password'  for xacml DB'"));
+		throw new Exception
+			  ("Missing IntegrityMonitor property: 'javax.persistence.jbdc.password'  for xacml DB'");
 	  }		
 
 	// Now that we've validated the properties, create Drools Integrity Monitor
@@ -300,7 +300,7 @@
 	 */
 	public String getName()
 	{
-	  return(name);
+	  return name;
 	}
 
 	/**
@@ -308,7 +308,7 @@
 	 */
 	public String getResponse()
 	{
-	  return(response);
+	  return response;
 	}
 
 	/**
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java
index 84cb7e3..7eed736 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java
@@ -53,7 +53,7 @@
    */
   static DroolsPDPIntegrityMonitor.AuditBase getInstance()
   {
-	return(instance);
+	return instance;
   }
 
   /**
@@ -123,8 +123,8 @@
 	String repositoryPassword =
 	  StateManagementProperties.getProperty("repository.audit.password");
 	boolean upload =
-	  (repositoryId != null && repositoryUrl != null
-	   && repositoryUsername != null && repositoryPassword != null);
+	   repositoryId != null && repositoryUrl != null
+	   && repositoryUsername != null && repositoryPassword != null;
 
 	// used to incrementally construct response as problems occur
 	// (empty = no problems)
@@ -410,8 +410,8 @@
 			 "curl",
 			 "--request", "DELETE",
 			 "--user", repositoryUsername + ":" + repositoryPassword,
-			 (repositoryUrl + "/" + groupId.replace('.', '/') + "/" +
-			  artifactId + "/" + version))
+			 repositoryUrl + "/" + groupId.replace('.', '/') + "/" +
+			  artifactId + "/" + version)
 			!= 0)
 		  {
 			logger.error
@@ -437,13 +437,15 @@
 	  (dir,
 	   new SimpleFileVisitor<Path>()
 	   {
+		 @Override
 		 public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
 		   {
 			 // logger.info("RepositoryAudit: Delete " + file);
 			 file.toFile().delete();
-			 return(FileVisitResult.CONTINUE);
+			 return FileVisitResult.CONTINUE;
 		   }
 
+		 @Override
 		 public FileVisitResult postVisitDirectory(Path file, IOException e)
 		   throws IOException
 		   {
@@ -451,11 +453,11 @@
 			   {
 				 // logger.info("RepositoryAudit: Delete " + file);
 				 file.toFile().delete();
-				 return(FileVisitResult.CONTINUE);
+				 return FileVisitResult.CONTINUE;
 			   }
 			 else
 			   {
-				 throw(e);
+				 throw e;
 			   }
 		   }
 	   });
@@ -492,12 +494,12 @@
 	if (process.waitFor(timeoutInSeconds, TimeUnit.SECONDS))
 	  {
 		// process terminated before the timeout
-		return(process.exitValue());
+		return process.exitValue();
 	  }
 	
 	// process timed out -- kill it, and return -1
 	process.destroyForcibly();
-	return(-1);
+	return -1;
   }
 
   /* ============================================================ */
@@ -538,21 +540,22 @@
 	  String[] segments = artifact.split("/");
 	  if (segments.length != 4 && segments.length != 3)
 		{
-		  throw(new IllegalArgumentException("groupId/artifactId/version/type"));
+		  throw new IllegalArgumentException("groupId/artifactId/version/type");
 		}
 	  groupId = segments[0];
 	  artifactId = segments[1];
 	  version = segments[2];
-	  type = (segments.length == 4 ? segments[3] : "jar");
+	  type = segments.length == 4 ? segments[3] : "jar";
 	}
 
 	/**
 	 * @return the artifact id in the form:
 	 *		"<groupId>/<artifactId>/<version>/<type>"
 	 */
+	@Override
 	public String toString()
 	{
-	  return(groupId + "/" + artifactId + "/" + version + "/" + type);
+	  return groupId + "/" + artifactId + "/" + version + "/" + type;
 	}
   }
 }
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
index c8e17ea..f90f748 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
@@ -38,6 +38,9 @@
 	public static final String DB_PWD = "javax.persistence.jdbc.password";
 	
 	private static Properties properties = null;
+
+	private StateManagementProperties(){
+	}
 	/*
 	 * Initialize the parameter values from the feature-state-management.properties file values
 	 * 
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java
index 34c8589..d0b625d 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyControllerFactory.java
@@ -190,13 +190,13 @@
 	 * Policy Controller Name Index
 	 */
 	protected HashMap<String,PolicyController> policyControllers =
-			new HashMap<String,PolicyController>();
+			new HashMap<>();
 	
 	/**
 	 * Group/Artifact Ids Index
 	 */
 	protected HashMap<String,PolicyController> coordinates2Controller = 
-			new HashMap<String,PolicyController>();
+			new HashMap<>();
 	
 	/**
 	 * produces key for indexing controller names
@@ -479,7 +479,7 @@
 	@Override
 	public List<PolicyController> inventory() {
 		 List<PolicyController> controllers = 
-				 new ArrayList<PolicyController>(this.policyControllers.values());
+				 new ArrayList<>(this.policyControllers.values());
 		 return controllers;
 	}
 	
@@ -488,7 +488,7 @@
 	 */
 	@Override 
 	public List<String> getFeatures() {
-		List<String> features = new ArrayList<String>();
+		List<String> features = new ArrayList<>();
 		for (PolicyControllerFeatureAPI feature : PolicyControllerFeatureAPI.providers.getList()) {
 			features.add(feature.getName());
 		}