diff options
Diffstat (limited to 'policy-management/src/main')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java | 8 | ||||
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java index c5841b06..8b807387 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java +++ b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java @@ -89,6 +89,7 @@ import org.slf4j.LoggerFactory; tags = {@Tag(name = "pdp-d-telemetry", description = "Drools PDP Telemetry Operations")}) public class RestManager { + private static final String OFFER_FAILED = "{}: cannot offer to topic {} because of {}"; private static final String CANNOT_PERFORM_OPERATION = "cannot perform operation"; private static final String NO_FILTERS = " no filters"; private static final String NOT_FOUND = " not found: "; @@ -2085,17 +2086,16 @@ public class RestManager { .build(); } } catch (IllegalArgumentException e) { - logger.debug("{}: cannot offer to topic {} because of {}", this, topic, e.getMessage(), - e); + logger.debug(OFFER_FAILED, this, topic, e.getMessage(), e); return Response.status(Response.Status.NOT_FOUND) .entity(new Error(topic + NOT_FOUND_MSG)).build(); } catch (IllegalStateException e) { - logger.debug("{}: cannot offer to topic {} because of {}", this, topic, e.getMessage(), - e); + logger.debug(OFFER_FAILED, this, topic, e.getMessage(), e); return Response.status(Response.Status.NOT_ACCEPTABLE) .entity(new Error(topic + " not acceptable due to current state")) .build(); } catch (Exception e) { + logger.debug(OFFER_FAILED, this, topic, e.getMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(new Error(e.getMessage())) .build(); } diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java index c924fd69..757b67fa 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java @@ -841,8 +841,8 @@ class PolicyEngineManager implements PolicyEngine { logger.warn("{}: abnormal termination - shutdown graceful time period expiration", PolicyEngineManager.this); } catch (final InterruptedException e) { - /* courtesy to shutdown() to allow it to return */ synchronized (PolicyEngineManager.this) { + /* courtesy to shutdown() to allow it to return */ } logger.info("{}: finishing a graceful shutdown ", PolicyEngineManager.this, e); } finally { |