diff options
author | 2017-09-15 11:41:47 -0400 | |
---|---|---|
committer | 2017-09-15 13:57:04 -0400 | |
commit | 23808f02e323e745df5749b770cba02fd5c0bfc8 (patch) | |
tree | 33f65a207315397d3560f9b70c8c2c01df07e5e6 /controlloop/common/guard/src/main/java/org | |
parent | c40726a43c457bed4da442175f5c1b5f4704f57c (diff) |
Fix sonar criticals
Either re-interrupt this method or rethrow Exception
Transient/Serializable issues
Unused imports
logging exceptions
Issue-ID: POLICY-115
Change-Id: I4c8a0c780e2f6c6e8218c1457f18470f7d95919c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/guard/src/main/java/org')
5 files changed, 5 insertions, 5 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 6be59d668..afb847e09 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 @@ -387,7 +387,7 @@ public class PIPEngineGetHistory extends StdConfigurableEngine{ try { diff = now - dateUtil.init(timeWindow).getMs(); } catch (Exception ex) { - System.err.println("PIP thread got Exception " + ex.getLocalizedMessage()); + logger.error("PIP thread got Exception " + ex); return -1; } diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java index dbaf711c4..5ecb44162 100644 --- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java +++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java @@ -140,7 +140,7 @@ public class PolicyGuardXacmlHelper { } catch (Exception e) { String message = "Parsing Content-Type: " + connection.getContentType() + ", error=" + e.getMessage(); - logger.error("{}: callRESTfulPDP threw: ", message); + logger.error("{}: callRESTfulPDP threw: ", message, e); } } else { diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/PNFTargetLock.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/PNFTargetLock.java index ea966ea55..62ddb0d71 100644 --- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/PNFTargetLock.java +++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/PNFTargetLock.java @@ -38,7 +38,7 @@ public class PNFTargetLock implements TargetLock, Serializable { private final TargetType targetType; private final String target; private final UUID requestID; - private final LockCallback callback; + private final transient LockCallback callback; public PNFTargetLock (TargetType type, String target, UUID requestID, LockCallback callback) { this.lockID = UUID.randomUUID(); diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VMTargetLock.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VMTargetLock.java index 1de105ce4..0a7556bc9 100644 --- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VMTargetLock.java +++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VMTargetLock.java @@ -37,7 +37,7 @@ public class VMTargetLock implements TargetLock, Serializable { private final TargetType targetType; private final String target; private final UUID requestID; - private final LockCallback callback; + private final transient LockCallback callback; public VMTargetLock(TargetType targetType, String target, UUID requestID, LockCallback callback) { this.lockID = UUID.randomUUID(); diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VNFTargetLock.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VNFTargetLock.java index 1350d5c54..b6e49b578 100644 --- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VNFTargetLock.java +++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/impl/VNFTargetLock.java @@ -38,7 +38,7 @@ public class VNFTargetLock implements TargetLock, Serializable { private final TargetType targetType; private final String target; private final UUID requestID; - private final LockCallback callback; + private final transient LockCallback callback; public VNFTargetLock (TargetType type, String target, UUID requestID, LockCallback callback) { this.lockID = UUID.randomUUID(); |