You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2018/06/18 09:55:48 UTC

[2/3] aries-jax-rs-whiteboard git commit: This block has to be always before the rest

This block has to be always before the rest

So we insert it, after all the processing has been done, as the first
node.

This becomes more apparent with the fixation of the effects execution
ordering in the new version of the DSL.


Project: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/commit/bee2c6e1
Tree: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/tree/bee2c6e1
Diff: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/diff/bee2c6e1

Branch: refs/heads/master
Commit: bee2c6e17c17772387532c3c589b4d5fd33b1fa6
Parents: 359efa0
Author: Carlos Sierra <cs...@apache.org>
Authored: Mon Jun 18 11:23:59 2018 +0200
Committer: Carlos Sierra <cs...@apache.org>
Committed: Mon Jun 18 11:23:59 2018 +0200

----------------------------------------------------------------------
 .../aries/jax/rs/whiteboard/internal/Whiteboard.java   | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/bee2c6e1/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/Whiteboard.java
----------------------------------------------------------------------
diff --git a/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/Whiteboard.java b/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/Whiteboard.java
index 6956c85..8992cfc 100644
--- a/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/Whiteboard.java
+++ b/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/Whiteboard.java
@@ -933,13 +933,7 @@ public class Whiteboard {
             OSGi<CachingServiceReference<Application>> program = just(
                 reference);
 
-            if (extensionDependencies.length > 0) {
-                program = effects(
-                    () -> _runtime.addDependentApplication(reference),
-                    () -> _runtime.removeDependentApplication(reference)
-                ).then(program);
-            }
-            else {
+            if (extensionDependencies.length == 0) {
                 return program;
             }
 
@@ -1001,6 +995,11 @@ public class Whiteboard {
                     then(program);
             }
 
+            program = effects(
+                () -> _runtime.addDependentApplication(reference),
+                () -> _runtime.removeDependentApplication(reference)
+            ).then(program);
+
             program = program.effects(
                 __ -> _runtime.removeDependentApplication(reference),
                 __ -> {}