valepakh commented on code in PR #7013:
URL: https://github.com/apache/ignite-3/pull/7013#discussion_r2549503085


##########
modules/code-deployment/src/main/java/org/apache/ignite/internal/deployunit/CachedDeploymentUnit.java:
##########
@@ -41,10 +41,14 @@ public <T, R> CompletableFuture<R> 
process(DeploymentUnitProcessor<T, R> process
     @Override
     public void close() throws Exception {
         future.whenComplete((unit, throwable) -> {
-            try {
-                unit.close();
-            } catch (Exception e) {
-                LOG.warn("Failed to close deployment unit: {}", e, unit);
+            if (unit != null) {

Review Comment:
   It looks like unit is always non-null if the future completes normally, so 
maybe we can instead check for the `throwable != null` as it's the usual 
pattern in the `whenComplete` calls?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to