jbonofre commented on code in PR #1017:
URL: https://github.com/apache/arrow-java/pull/1017#discussion_r2816279893
##########
memory/memory-core/src/main/java/org/apache/arrow/util/AutoCloseables.java:
##########
@@ -48,7 +51,10 @@ public void close() throws Exception {
* @param t the throwable to add suppressed exception to
* @param autoCloseables the closeables to close
*/
- public static void close(Throwable t, AutoCloseable... autoCloseables) {
+ public static void close(Throwable t, @Nullable AutoCloseable...
autoCloseables) {
+ if (autoCloseables == null) {
+ return;
Review Comment:
That should not happen, but it seems you have a case ;)
##########
memory/memory-core/src/main/java/org/apache/arrow/util/AutoCloseables.java:
##########
@@ -33,7 +35,8 @@ private AutoCloseables() {}
* Returns a new {@link AutoCloseable} that calls {@link #close(Iterable)}
on <code>autoCloseables
* </code> when close is called.
*/
- public static AutoCloseable all(final Collection<? extends AutoCloseable>
autoCloseables) {
+ public static AutoCloseable all(
+ final @Nullable Collection<? extends @Nullable AutoCloseable>
autoCloseables) {
Review Comment:
I don't have problem to add `@Nullable` here.
--
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]