summaryrefslogtreecommitdiffstats
path: root/controlloop
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-08-31 16:24:13 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-31 16:24:13 +0000
commite48570375ddc7a524f9208e62487e1597afd06da (patch)
tree22408fdba03bb881c516e2e89e21f0f82e89c6ad /controlloop
parent3b25dd8b60d2d8d7f147efefc5425851aec0021e (diff)
parent71e1534a5b93392ed484e9c291aa5fe7d4cb75ba (diff)
Merge "Fix Sonar Blockers for Drools-Applications"
Diffstat (limited to 'controlloop')
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
index 9e8ed9db0..9382203d1 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
@@ -185,21 +185,19 @@ public class PIPEngineGetHistory extends StdConfigurableEngine{
try {
pipResponse = pipFinder.getMatchingAttributes(pipRequest, this);
- if (pipResponse != null) {
- if (pipResponse.getStatus() != null && !pipResponse.getStatus().isOk()) {
+ if ((pipResponse != null)
+ && (pipResponse.getStatus() != null)
+ && (!pipResponse.getStatus().isOk())) {
logger.warn("Error retrieving {}: {}", pipRequest.getAttributeId().stringValue(), pipResponse.getStatus().toString());
pipResponse = null;
- }
- if (pipResponse.getAttributes() != null && pipResponse.getAttributes().isEmpty()) {
+ }
+ if ((pipResponse != null)
+ && (pipResponse.getAttributes() != null)
+ && (pipResponse.getAttributes().isEmpty())) {
logger.warn("Error retrieving {}: {}", pipRequest.getAttributeId().stringValue(), pipResponse.getStatus().toString());
logger.warn("Error retrieving {}: {}", pipRequest.getAttributeId().stringValue(), pipResponse.getStatus());
pipResponse = null;
}
- if (pipResponse.getAttributes() != null && pipResponse.getAttributes().isEmpty()) {
- logger.warn("Error retrieving {}: {}", pipRequest.getAttributeId().stringValue(), pipResponse.getStatus());
- pipResponse = null;
- }
- }
} catch (PIPException ex) {
logger.error("getAttribute threw:", ex);
}