diff options
Diffstat (limited to 'dcaedt_catalog/commons/src/main/java/org/onap/sdc/dcae/catalog/commons/Futures.java')
-rw-r--r-- | dcaedt_catalog/commons/src/main/java/org/onap/sdc/dcae/catalog/commons/Futures.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dcaedt_catalog/commons/src/main/java/org/onap/sdc/dcae/catalog/commons/Futures.java b/dcaedt_catalog/commons/src/main/java/org/onap/sdc/dcae/catalog/commons/Futures.java index a405932..1773fdd 100644 --- a/dcaedt_catalog/commons/src/main/java/org/onap/sdc/dcae/catalog/commons/Futures.java +++ b/dcaedt_catalog/commons/src/main/java/org/onap/sdc/dcae/catalog/commons/Futures.java @@ -115,10 +115,12 @@ public class Futures<T> { BasicHandler<T> hnd = buildHandler(); setHandler(hnd); hnd.waitForCompletion(); - if (failed()) - throw (Exception)cause(); - else + if (failed()) { + throw (Exception) cause(); + } + else { return result(); + } } public Future<T> waitForCompletion() throws InterruptedException { |