diff options
author | rb7147 <rb7147@att.com> | 2017-07-26 10:11:15 -0400 |
---|---|---|
committer | rb7147 <rb7147@att.com> | 2017-07-26 11:53:31 -0400 |
commit | d80880b097d08f9ab9dda54355216890a4b345dc (patch) | |
tree | 6c7b6caec61dbada2201f7ee14c8c1e027106d6d /ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services | |
parent | e92ff832cf993db876f22b2d27562fedf59f5043 (diff) |
[POLICY-117] Resolve the Policy Critical issues
Change-Id: Ice72d7fa40151bff5db42f5dd632f04a3853b094
Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services')
2 files changed, 6 insertions, 6 deletions
diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/CreateUpdatePolicyServiceImpl.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/CreateUpdatePolicyServiceImpl.java index 6112c42ce..cf2171137 100644 --- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/CreateUpdatePolicyServiceImpl.java +++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/CreateUpdatePolicyServiceImpl.java @@ -222,9 +222,9 @@ public class CreateUpdatePolicyServiceImpl implements CreateUpdatePolicyService return false; } if (policyParameters.getPolicyName().contains(".")) { - policyName = policyParameters.getPolicyName().substring(policyParameters.getPolicyName().lastIndexOf(".") + 1, + policyName = policyParameters.getPolicyName().substring(policyParameters.getPolicyName().lastIndexOf('.') + 1, policyParameters.getPolicyName().length()); - policyScope = policyParameters.getPolicyName().substring(0,policyParameters.getPolicyName().lastIndexOf(".")); + policyScope = policyParameters.getPolicyName().substring(0,policyParameters.getPolicyName().lastIndexOf('.')); LOGGER.info("Name is " + policyName + " scope is " + policyScope); } else { message = XACMLErrorConstants.ERROR_DATA_ISSUE + "No Policy Scope given."; diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java index 66a557056..aea058d37 100644 --- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java +++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java @@ -230,7 +230,7 @@ public class PAPServices { try { throw new Exception(XACMLErrorConstants.ERROR_DATA_ISSUE +"PAPs List is empty."); } catch (Exception e) { - LOGGER.error(e.getMessage()); + LOGGER.error(e.getMessage() + e); } }else { int papsCount = 0; @@ -319,7 +319,7 @@ public class PAPServices { try { throw new Exception(XACMLErrorConstants.ERROR_DATA_ISSUE +"ERROR in connecting to the PAP ", e); } catch (Exception e1) { - LOGGER.error(e1.getMessage()); + LOGGER.error(e1.getMessage() + e1); } } @@ -328,7 +328,7 @@ public class PAPServices { try { throw new Exception(XACMLErrorConstants.ERROR_DATA_ISSUE +"ERROR in connecting to the PAP "); } catch (Exception e) { - LOGGER.error(e.getMessage()); + LOGGER.error(e.getMessage() + e); } } } @@ -390,7 +390,7 @@ public class PAPServices { scanner.close(); } catch (IOException e1) { - LOGGER.error(e1.getMessage()); + LOGGER.error(e1.getMessage() + e1); } response = "Transaction ID: " + requestID + " --Dictionary Items Retrieved " + json; } else if ("getMetrics".equals(operation)) { |