polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [1/6] polygene-java git commit: Remove unnecessary try/catch around AssemblyException
Date Mon, 22 May 2017 15:33:48 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/develop 1a79168fa -> c7f705bd2


Remove unnecessary try/catch around AssemblyException


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/f07b3233
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/f07b3233
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/f07b3233

Branch: refs/heads/develop
Commit: f07b323316bb8e181f622e1d8edadef4e28330c2
Parents: 1a79168
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 22 10:21:10 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 22 10:21:10 2017 +0200

----------------------------------------------------------------------
 .../runtime/bootstrap/ModuleAssemblyImpl.java   | 29 +++++---------------
 1 file changed, 7 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/f07b3233/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
index 011da1b..de76f78 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.runtime.bootstrap;
 
-import java.lang.reflect.UndeclaredThrowableException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -666,28 +665,14 @@ final class ModuleAssemblyImpl
     }
 
     private void addDefaultAssemblers()
-            throws AssemblyException
     {
-        try
-        {
-            defaultAssemblers.entrySet().stream()
-                    .filter(entry -> serviceAssemblies.stream().noneMatch(serviceAssembly
-> serviceAssembly.hasType(entry.getKey())))
-                    .forEach(entry ->
-                    {
-                        try
-                        {
-                            entry.getValue().assemble(this);
-                        }
-                        catch (AssemblyException e)
-                        {
-                            throw new UndeclaredThrowableException(e);
-                        }
-                    });
-        }
-        catch (UndeclaredThrowableException e)
-        {
-            throw (AssemblyException) e.getUndeclaredThrowable();
-        }
+        defaultAssemblers
+            .entrySet()
+            .stream()
+            .filter( entry ->
+                         serviceAssemblies.stream().noneMatch( serviceAssembly ->
+                                                                   serviceAssembly.hasType(
entry.getKey() ) ) )
+            .forEach( entry -> entry.getValue().assemble( this ) );
     }
 
     private Identity generateId(Stream<Class<?>> serviceTypes)


Mime
View raw message