summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-16 02:03:12 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-16 02:04:11 +0100
commit952d4f5aab9913f961e77fa0457da5d38f31d94f (patch)
treed482ebae10ff11b3096dd85d927eca75825574d6 /model
parenta65e4772f4557a109917532b2d9c49680ce3bb15 (diff)
Fix Sonar issues in apex
Fixing various Sonar issues in apex. Issue-ID: POLICY-1034 Change-Id: Ie693637d75bd7e38c71b7ba04886fb75636276ed Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model')
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java2
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
index ad5b74c3a..c3617012e 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
@@ -164,7 +164,7 @@ public class ContextAlbumFacade {
contextAlbum.setScope(scope);
}
if (writable != null) {
- if (writable.trim().equalsIgnoreCase("true") || writable.trim().equalsIgnoreCase("t")) {
+ if ("true".equalsIgnoreCase(writable.trim()) || "t".equalsIgnoreCase(writable.trim())) {
contextAlbum.setWritable(true);
} else {
contextAlbum.setWritable(false);
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java
index a40a8100f..f1bc4aece 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java
@@ -99,7 +99,7 @@ public class PolicyLogicReader implements AxLogicReader {
@Override
public String readLogic(final AxLogic axLogic) {
// Java uses compiled logic, other executor types run scripts
- if (axLogic.getLogicFlavour().equals("JAVA")) {
+ if ("JAVA".equals(axLogic.getLogicFlavour())) {
// Check if we're using the default logic
if (defaultLogic != null) {
// Return the java class name for the default logic