You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by po...@apache.org on 2019/05/01 20:03:51 UTC
[incubator-tamaya] branch try_with_resource updated: Apply
multi-catch.
This is an automated email from the ASF dual-hosted git repository.
pottlinger pushed a commit to branch try_with_resource
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya.git
The following commit(s) were added to refs/heads/try_with_resource by this push:
new 82d339b Apply multi-catch.
82d339b is described below
commit 82d339b615193e808b49b0649ffe42cb49421a01
Author: Hugo Hirsch <gi...@hugo-hirsch.de>
AuthorDate: Wed May 1 22:03:41 2019 +0200
Apply multi-catch.
---
.../main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java
index 8ca0065..66f9009 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java
@@ -164,9 +164,7 @@ public class OSGIServiceLoader implements BundleListener {
BundleContext bundleContext = bundle.getBundleContext();
bundleContext.registerService(serviceName, factory, props);
LOG.info("Registered Tamaya service class: " + implClassName + "(" + serviceName + ")");
- } catch (Exception e) {
- LOG.log(Level.SEVERE, "Failed to load service: " + implClassName, e);
- } catch (NoClassDefFoundError err) {
+ } catch (NoClassDefFoundError | Exception err) {
LOG.log(Level.SEVERE, "Failed to load service: " + implClassName, err);
}
}