You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IOUtils.close() only accepts Closeable as a vararg which results in unnecessary Object[] created if only one Closeable passed there
100% of close() usage is with only one Closeable.
While it is not very often used (log rotation, shutdown etc) we can still avoid this extra allocation.
The text was updated successfully, but these errors were encountered:
… results in unnecessary Object[] created if only one Closeable passed there
Descriptions of the changes in this PR:
added close() variant that takes one Closeable.
### Motivation
100% of close() usage is with one Closeable.
### Changes
light refactoring.
Master Issue: #1740
Author: Andrey Yegorov <ayegorov@salesforce.com>
Reviewers: Sijie Guo <sijie@apache.org>, Enrico Olivelli <eolivelli@gmail.com>
This closes#1741 from dlg99/nit/ioutils, closes#1740
(cherry picked from commit 117ba4d)
Signed-off-by: Sijie Guo <sijie@apache.org>
… results in unnecessary Object[] created if only one Closeable passed there
Descriptions of the changes in this PR:
added close() variant that takes one Closeable.
### Motivation
100% of close() usage is with one Closeable.
### Changes
light refactoring.
Master Issue: #1740
Author: Andrey Yegorov <ayegorov@salesforce.com>
Reviewers: Sijie Guo <sijie@apache.org>, Enrico Olivelli <eolivelli@gmail.com>
This closes#1741 from dlg99/nit/ioutils, closes#1740
(cherry picked from commit 117ba4d)
Signed-off-by: Sijie Guo <sijie@apache.org>
BUG REPORT
IOUtils.close() only accepts Closeable as a vararg which results in unnecessary Object[] created if only one Closeable passed there
100% of close() usage is with only one Closeable.
While it is not very often used (log rotation, shutdown etc) we can still avoid this extra allocation.
The text was updated successfully, but these errors were encountered: