agura commented on a change in pull request #203:
URL: https://github.com/apache/ignite-3/pull/203#discussion_r673252895
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
##########
@@ -469,4 +472,16 @@ public static void closeAll(Collection<? extends
AutoCloseable> closeables) thro
if (ex != null)
throw ex;
}
+
+ /**
+ * Closes all provided objects.
+ *
+ * @param closeables Array of closeable objects to close.
+ * @throws Exception If failed to close.
+ *
+ * @see #closeAll(Collection)
+ */
+ public static void closeAll(AutoCloseable... closeables) throws Exception {
+ closeAll(Arrays.asList(closeables));
Review comment:
@sashapolo It's just a good practice. But in this particular case we can
ignore it. But in most cases (especially on hot path) it is best practice in
Ignite to avoid redundant objects creation. We can't pray to escape analysis.
--
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]