From commits-return-40559-archive-asf-public=cust-asf.ponee.io@tinkerpop.apache.org Mon Sep 7 05:25:21 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 4DC31180181 for ; Mon, 7 Sep 2020 07:25:21 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 9B9DD62CD7 for ; Mon, 7 Sep 2020 05:25:20 +0000 (UTC) Received: (qmail 30244 invoked by uid 500); 7 Sep 2020 05:25:20 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 30235 invoked by uid 99); 7 Sep 2020 05:25:19 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Sep 2020 05:25:19 +0000 From: =?utf-8?q?GitBox?= To: commits@tinkerpop.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Btinkerpop=5D_rdtr_opened_a_new_pull_request_=23132?= =?utf-8?q?5=3A_=5BTINKERPOP-2416=5D_MultiIterator_implement_AutoCloseable_a?= =?utf-8?q?nd_close_hold=E2=80=A6?= Message-ID: Date: Mon, 07 Sep 2020 05:25:19 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit rdtr opened a new pull request #1325: URL: https://github.com/apache/tinkerpop/pull/1325 As described in the [JIRA](https://issues.apache.org/jira/browse/TINKERPOP-2416), currently `MultiIterator` does not implement `AutoCloseable`. This potentially introduces resource leak when we have multiple iterators that implement `AutoCloseable` and combine them using `IteratorUtils#concat`. The caller may expect all iterators to be closed automatically by calling `CloseableIterator#closeIterator` but right now `MultiIterator` doesn't implement AutoCloseable so even the underlying iterators are auto-closeable, they are never be closed. This simple PR just adds AutoCloseable implementation to MultiIterator, close all inner iterators if they implement AutoCloseable. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: users@infra.apache.org