diff options
Diffstat (limited to 'ECOMP-PDP-REST/src/main')
3 files changed, 17 insertions, 18 deletions
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 b00346de6..5aa3360ca 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 @@ -611,19 +611,21 @@ public class PAPServices { response = "Transaction ID: " + requestID + " --Policy with the name "+ connection.getHeaderField("policyName") + " was successfully updated. "; if (connection.getHeaderField("safetyChecker")!=null) { - response = response + "\nPolicy Safety Checker Warning: This closedLoopControlName (" - + connection.getHeaderField("newCLName") + ") " + "is potentially in conflict with " + connection.getHeaderField("conflictCLName") - + "that already exists." + "See detailed information on ClosedLoop Pairs below: " - +"\n"+connection.getHeaderField("safetyChecker"); + response = response + + "\n\nPolicy Safety Checker Warning: This closedLoopControlName " + + "is potentially in conflict with " + connection.getHeaderField("conflictCLName") + + " that already exists." + " See detailed information on ClosedLoop Pairs below: " + +"\n\n"+connection.getHeaderField("safetyChecker"); } } else if ("create".equals(operation)) { response = "Transaction ID: " + requestID + " --Policy with the name "+ connection.getHeaderField("policyName") + " was successfully created."; if (connection.getHeaderField("safetyChecker")!=null) { - response = response + "\nPolicy Safety Checker Warning: This closedLoopControlName (" - + connection.getHeaderField("newCLName") + ") " + "is potentially in conflict with " + connection.getHeaderField("conflictCLName") - + "that already exists." + "See detailed information on ClosedLoop Pairs below: " - +"\n"+connection.getHeaderField("safetyChecker"); + response = response + + "\n\nPolicy Safety Checker Warning: This closedLoopControlName " + + "is potentially in conflict with " + connection.getHeaderField("conflictCLName") + + " that already exists. " + "See detailed information on ClosedLoop Pairs below: " + +"\n\n"+connection.getHeaderField("safetyChecker"); } } else if ("delete".equals(operation)) { response = "Transaction ID: " + requestID + " --The policy was successfully deleted."; diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java index 5f62be3ac..1acc18eb0 100644 --- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java +++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java @@ -41,6 +41,7 @@ import com.att.nsa.cambria.client.CambriaConsumer; import com.att.nsa.cambria.client.CambriaPublisher; import com.att.research.xacml.util.XACMLProperties; +@SuppressWarnings("deprecation") public class ManualNotificationUpdateThread implements Runnable { private static final Logger LOGGER = FlexLogger.getLogger(ManualNotificationUpdateThread.class); @@ -139,8 +140,7 @@ public class ManualNotificationUpdateThread implements Runnable { try { throw new Exception(XACMLErrorConstants.ERROR_DATA_ISSUE + "DMaaP properties are missing from the property file "); } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); + LOGGER.error(e); } } diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java index fe295ebb8..cb1cf9f03 100644 --- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java +++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java @@ -158,15 +158,12 @@ public class NotificationServer { // to succeed before giving up. If any messages are unsent after that time, // they're returned to your app. You could, for example, persist to disk // and try again later. - final List stuck = pub.close ( 20, TimeUnit.SECONDS ); + final List<?> stuck = pub.close ( 20, TimeUnit.SECONDS ); - if ( stuck.size () > 0 ) - { - System.err.println ( stuck.size() + " messages unsent" ); - } - else - { - System.out.println ( "Clean exit; all messages sent: " + notification ); + if ( stuck.size () > 0 ){ + LOGGER.error( stuck.size() + " messages unsent" ); + }else{ + LOGGER.info( "Clean exit; all messages sent: " + notification ); } } else if (propNotificationType.equals("dmaap")) { |