From a1194798f406efe32cb33510f1a9d58b0b5f9bd9 Mon Sep 17 00:00:00 2001 From: "beili.zhou" Date: Tue, 29 Aug 2017 18:33:57 -0400 Subject: Remove catch throwable and error Fix the following sonar blocker issue: - Catch Exception instead of Throwable - Catch Exception instead of Error Issue-Id: APPC-175 Change-Id: I16a1018001b067216740ec11e5a97e52d714db69 Signed-off-by: beili.zhou --- .../main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'appc-asdc-listener/appc-asdc-listener-bundle/src/main') diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java b/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java index 345149686..b5307d697 100644 --- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java +++ b/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java @@ -83,15 +83,16 @@ public class AsdcCallback implements INotificationCallback { BundleContext bctx = FrameworkUtil.getBundle(EventSender.class).getBundleContext(); ServiceReference sref = bctx.getServiceReference(EventSender.class); eventSender = (EventSender) bctx.getService(sref); - } catch (Throwable t) { - logger.error("AsdcCallback failed on initializing EventSender", t); + } catch (Exception e) { + logger.error("AsdcCallback failed on initializing EventSender", e); } } if (isRunning.get()) { for(IArtifactInfo artifact:data.getServiceArtifacts()){ - ArtifactProcessor artifactProcessor = ArtifactProcessorFactory.getArtifactProcessor(client, eventSender, data, null, artifact, storeUri); + ArtifactProcessor artifactProcessor = ArtifactProcessorFactory.getArtifactProcessor( + client, eventSender, data, null, artifact, storeUri); if(artifactProcessor!=null){ executor.submit(artifactProcessor); } -- cgit 1.2.3-korg