aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csie...@apache.org
Subject svn commit: r1803991 - /aries/trunk/component-dsl/component-dsl/src/main/java/org/apache/aries/osgi/functional/internal/DistributeOSGi.java
Date Thu, 03 Aug 2017 12:36:50 GMT
Author: csierra
Date: Thu Aug  3 12:36:50 2017
New Revision: 1803991

URL: http://svn.apache.org/viewvc?rev=1803991&view=rev
Log:
Close all results even if one fails

Otherwise a failure in one result will leave the application in an
inconsistent state

Modified:
    aries/trunk/component-dsl/component-dsl/src/main/java/org/apache/aries/osgi/functional/internal/DistributeOSGi.java

Modified: aries/trunk/component-dsl/component-dsl/src/main/java/org/apache/aries/osgi/functional/internal/DistributeOSGi.java
URL: http://svn.apache.org/viewvc/aries/trunk/component-dsl/component-dsl/src/main/java/org/apache/aries/osgi/functional/internal/DistributeOSGi.java?rev=1803991&r1=1803990&r2=1803991&view=diff
==============================================================================
--- aries/trunk/component-dsl/component-dsl/src/main/java/org/apache/aries/osgi/functional/internal/DistributeOSGi.java
(original)
+++ aries/trunk/component-dsl/component-dsl/src/main/java/org/apache/aries/osgi/functional/internal/DistributeOSGi.java
Thu Aug  3 12:36:50 2017
@@ -56,7 +56,14 @@ public class DistributeOSGi extends OSGi
                 () -> {
                     removedSource.accept(Tuple.create(null));
 
-                    results.forEach(OSGiResult::close);
+                    for (OSGiResult<?> result : results) {
+                        try {
+                            result.close();
+                        }
+                        catch (Exception ignored) {
+                        }
+                    }
+
                 }
             );
         });



Mime
View raw message