diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java index 6c23147bc59c8..6442d4447686f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java @@ -38,7 +38,6 @@ protected CreatableResourcesImpl() { @SafeVarargs public final CreatedResources create(Creatable ... creatables) throws Exception { ServiceCall> serviceCall = createAsync(null, creatables); - serviceCall.wait(); return serviceCall.get().getBody(); } @@ -326,18 +325,18 @@ ServiceCallback> wrapCallback(final ServiceCallback>() { @Override public void failure(Throwable t) { - self.failure(t); if (innerCallback != null) { innerCallback.failure((t)); } + self.failure(t); // Signal Future } @Override public void success(ServiceResponse> result) { - self.success(new ServiceResponse>(new CreatedResourcesImpl<>(result.getBody()), null)); if (innerCallback != null) { innerCallback.success(new ServiceResponse>(new CreatedResourcesImpl<>(result.getBody()), null)); } + self.success(new ServiceResponse>(new CreatedResourcesImpl<>(result.getBody()), null)); // Signal Future } }; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/ResourceServiceCall.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/ResourceServiceCall.java index 78cdf80656f4b..498f877f56b5f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/ResourceServiceCall.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/ResourceServiceCall.java @@ -55,8 +55,8 @@ public void failure(Throwable t) { if (self.failureHandler != null) { self.failureHandler.failure(t); } - self.failure(t); callback.failure(t); + self.failure(t); // Signal Future } @Override @@ -66,8 +66,8 @@ public void success(ServiceResponse response) { self.successHandler.success(response); } if (reportSuccess) { - self.success(new ServiceResponse(self.fluentModelImpl, response.getResponse())); callback.success(new ServiceResponse(self.fluentModelImpl, response.getResponse())); + self.success(new ServiceResponse(self.fluentModelImpl, response.getResponse())); // Signal Future } } };