diff --git a/headless-services/commons/commons-cf/src/main/java/org/springframework/ide/vscode/commons/cloudfoundry/client/v2/ReactorUtils.java b/headless-services/commons/commons-cf/src/main/java/org/springframework/ide/vscode/commons/cloudfoundry/client/v2/ReactorUtils.java index 7d20c4145..4fc32a26b 100644 --- a/headless-services/commons/commons-cf/src/main/java/org/springframework/ide/vscode/commons/cloudfoundry/client/v2/ReactorUtils.java +++ b/headless-services/commons/commons-cf/src/main/java/org/springframework/ide/vscode/commons/cloudfoundry/client/v2/ReactorUtils.java @@ -163,21 +163,21 @@ public class ReactorUtils { return Flux.merge( operations .map((Mono op) -> { - return op.otherwise((e) -> { + return op.onErrorResume((e) -> { failure.compareAndSet(null, e); return Mono.empty(); }); }), concurrency //limit concurrency otherwise troubles (flooding/choking request broker?) ) - .then(() -> { + .then(Mono.defer(() -> { Throwable error = failure.get(); if (error!=null) { return Mono.error(error); } else { return Mono.empty(); } - }); + })); } /** @@ -280,6 +280,10 @@ public class ReactorUtils { * Connect a mono to a CompletableFuture so that the result of the mono * can be retrieved from the {@link CompletableFuture} by calling it's 'get' * method. + * + * WARNING: this method looks like it has a bug and doesn't complete the + * future for a Mono.empty() case (i.e. a Mono that terminates without either + * a onNext or a onComplete call. */ public static void completeWith(CompletableFuture future, Mono mono) { mono.doOnNext((T v) -> { diff --git a/headless-services/commons/pom.xml b/headless-services/commons/pom.xml index 189657fa1..ecba487fd 100644 --- a/headless-services/commons/pom.xml +++ b/headless-services/commons/pom.xml @@ -81,9 +81,9 @@ 2.10 0.4.0-SNAPSHOT - 3.1.5.RELEASE - 0.6.0.RELEASE - 2.4.0.RELEASE + 3.8.0.RELEASE + 3.1.5.RELEASE + 0.7.5.RELEASE 2.4 diff --git a/vscode-extensions/vscode-manifest-yaml/package.json b/vscode-extensions/vscode-manifest-yaml/package.json index 0f90e4017..fd53d1fda 100644 --- a/vscode-extensions/vscode-manifest-yaml/package.json +++ b/vscode-extensions/vscode-manifest-yaml/package.json @@ -58,7 +58,7 @@ "vsce-package": "vsce package" }, "dependencies": { - "@pivotal-tools/commons-vscode": "^0.2.0", + "@pivotal-tools/commons-vscode": "file:../commons-vscode/pivotal-tools-commons-vscode-0.2.1.tgz", "vscode-languageclient": "^4.0.0" }, "devDependencies": {