Merge changes from topic '13891'

* changes:
  String literal comparision on left side
  Used isEmpty to check collection is empty or not
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java
index a0f1ba8..7c60ecf 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java
@@ -202,7 +202,7 @@
 		combiningAlgo2human.put("only-one-applicable", "to honour the result of the first successfully evaluated $placeholder$ in order");
 	}	
 	
-	private Map<String, AttributeIdentifiers> attributeIdentifiersMap = new HashMap<String, AttributeIdentifiers>();
+	private Map<String, AttributeIdentifiers> attributeIdentifiersMap = new HashMap<>();
 	
 	private final StringWriter stringWriter = new StringWriter();
 	private final PrintWriter htmlOut = new PrintWriter(stringWriter);
@@ -357,7 +357,7 @@
 		else
 			policySet(policySet, "li");
 		
-		if (policySet.getPolicySetOrPolicyOrPolicySetIdReference().size() > 0)
+		if (!policySet.getPolicySetOrPolicyOrPolicySetIdReference().isEmpty())
 			htmlOut.println("<ol>");
 
 		return super.onPreVisitPolicySet(parent, policySet);
@@ -377,7 +377,7 @@
 			LOGGER.trace("PolicySet: " + policySet.getPolicySetId() + 
 					     " Description: " + policySet.getDescription());	
 		
-		if (policySet.getPolicySetOrPolicyOrPolicySetIdReference().size() > 0)
+		if (!policySet.getPolicySetOrPolicyOrPolicySetIdReference().isEmpty())
 			htmlOut.println("</ol>");
 		
 		htmlOut.println("<p></p>");
@@ -421,7 +421,7 @@
 		}
 		
 		if (policySet.getPolicySetOrPolicyOrPolicySetIdReference() != null &&
-			policySet.getPolicySetOrPolicyOrPolicySetIdReference().size() > 0) {
+			!policySet.getPolicySetOrPolicyOrPolicySetIdReference().isEmpty()) {
 			String algoDesc = combiningAlgo2human.get(combiningAlgorithm);
 			if (algoDesc != null) {
 				algoDesc = algoDesc.replace("$placeholder$", "policy") + " (" + "<i>" + combiningAlgorithm + "</i>)";
@@ -449,7 +449,7 @@
 		
 		policy(policy);
 		
-		if (policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().size() > 0)
+		if (!policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().isEmpty())
 			htmlOut.println("<ol type=\"i\">");
 		
 		return super.onPreVisitPolicy(parent, policy);
@@ -464,7 +464,7 @@
 			LOGGER.trace("PolicySet: " + policy.getPolicyId() + 
 					     "Parent PolicySet: " + parent.getPolicySetId() + " Version: " + parent.getVersion());
 		
-		if (policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().size() > 0)
+		if (!policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().isEmpty())
 			htmlOut.println("</ol>");
 		
 		htmlOut.println("<p></p>");
@@ -506,7 +506,7 @@
 		}
 		
 		if (policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition() != null &&
-			policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().size() > 0) {
+			!policy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().isEmpty()) {
 			String algoDesc = combiningAlgo2human.get(combiningAlgorithm);
 			if (algoDesc != null) {
 				algoDesc = algoDesc.replace("$placeholder$", "rule") + " (<i>" + combiningAlgorithm + "</i>)";
@@ -710,7 +710,7 @@
 								//
 								StdAttribute attribute = null;
 								AttributeValueType value = match.getAttributeValue();
-								String attributeDataType = null;
+								String attributeDataType;
 								if (match.getAttributeDesignator() != null && value != null) {
 									AttributeDesignatorType designator = match.getAttributeDesignator();
 									attribute = new StdAttribute(new IdentifierImpl(designator.getCategory()),
@@ -822,11 +822,12 @@
 	}
 	
 	private String removePrimitives(String in) {
-		in = in.replace("string-", "");
-		in = in.replace("integer-", "");
-		in = in.replace("double-", "");
-		in = in.replace("boolean-", "");
-		return in;
+		String newIn = in;
+		newIn = newIn.replace("string-", "");
+		newIn = newIn.replace("integer-", "");
+		newIn = newIn.replace("double-", "");
+		newIn = newIn.replace("boolean-", "");
+		return newIn;
 	}
 	
 	private String stringifyCondition(ConditionType condition) {
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/conf/HibernateSession.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/conf/HibernateSession.java
index 353e08a..32f40b9 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/conf/HibernateSession.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/conf/HibernateSession.java
@@ -64,4 +64,6 @@
 		logSessionFactory = logSessionFactory1;
 	}
 
+	private HibernateSession(){
+	}
 }
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
index f10041e..392adf0 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
@@ -98,24 +98,24 @@
 										String attributeId = designator.getAttributeId();
 
 										// First match in the target is OnapName, so set that value.
-										if (attributeId.equals("ONAPName")) {
+										if ("ONAPName".equals(attributeId)) {
 											policyAdapter.setOnapName(value);
 										}
-										if (attributeId.equals("RiskType")){
+										if ("RiskType".equals(attributeId)){
 											policyAdapter.setRiskType(value);
 										}
-										if (attributeId.equals("RiskLevel")){
+										if ("RiskLevel".equals(attributeId)){
 											policyAdapter.setRiskLevel(value);
 										}
-										if (attributeId.equals("guard")){
+										if ("guard".equals(attributeId)){
 											policyAdapter.setGuard(value);
 										}
-										if (attributeId.equals("TTLDate") && !value.contains("NA")){
+										if ("TTLDate".equals(attributeId) && !value.contains("NA")){
 											PolicyController controller = new PolicyController();
 											String newDate = controller.convertDate(value);
 											policyAdapter.setTtlDate(newDate);
 										}
-										if (attributeId.equals("ServiceType")){
+										if ("ServiceType".equals(attributeId)){
 											LinkedHashMap<String, String> serviceTypePolicyName1 = new LinkedHashMap<>();
 											String key = "serviceTypePolicyName";
 											serviceTypePolicyName1.put(key, value);