diff options
author | gregory.hayes <gregory.hayes@est.tech> | 2020-12-09 20:42:33 +0000 |
---|---|---|
committer | gregory.hayes <gregory.hayes@est.tech> | 2020-12-17 16:23:57 +0000 |
commit | a3979b8a14f6e67de406b29c3e0ad0c516c3bc54 (patch) | |
tree | 13f0b33e9d5ace049fa5b99b036aed7df557c712 /services/services-engine/src/main/java/org | |
parent | e267120c204303088f3c15e580a5e1a364e014f5 (diff) |
Prune superfluous log and exception messages
Large volume exception messages should not be repeated in log messages
or in rethrown exceptions.
Jira-Link: https://jira.onap.org/browse/POLICY-2885
Issue-ID: POLICY-2885
Signed-off-by: gregory.hayes <gregory.hayes@est.tech>
Change-Id: I345531d3a7640cc5ad9dbfc367052b9c8cc19387
Diffstat (limited to 'services/services-engine/src/main/java/org')
2 files changed, 3 insertions, 7 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java index 459a2c4bf..e8e592b09 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019-2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,10 +111,7 @@ public class Apex2JsonEventConverter implements ApexEventProtocolConverter { eventList.add(jsonStringApexEvent(eventName, jsonEventString)); } } catch (final Exception e) { - final String errorString = "Failed to unmarshal JSON event: " + e.getMessage() + ", event=" - + jsonEventString; - LOGGER.warn(errorString, e); - throw new ApexEventException(errorString, e); + throw new ApexEventException("Failed to unmarshal JSON event, event=" + jsonEventString, e); } // Return the list of events we have unmarshalled diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java index dc9854158..fd6ac4489 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java @@ -263,8 +263,7 @@ public class ApexEventUnmarshaller implements ApexEventReceiver, Runnable { break; } catch (ApexException e) { if (!iterator.hasNext()) { - final String errorMessage = "Error while converting event into an ApexEvent for " + name + ": " - + e.getMessage() + ", Event=" + event; + final String errorMessage = "Error while converting event into an ApexEvent for " + name; throw new ApexEventException(errorMessage, e); } } |