Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with closer if the diffcat isn't used but an error is thrown #188

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix issue with closer if the diffcat isn't used but an error is thrown
  • Loading branch information
ate47 committed Jan 30, 2023
commit aba805eb271b9d31b16e259d47fc02a1329ce0d3
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public KCatImpl(List<String> hdtFileNames, List<? extends Bitmap> deleteBitmaps,
throw t;
} finally {
try {
Closer.closeAll((Object[]) deleteBitmapTriples);
Closer.closeAll((Object) deleteBitmapTriples);
} finally {
for (HDT hdt : hdts) {
IOUtil.closeQuietly(hdt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
Expand All @@ -20,7 +19,11 @@ public class Closer implements Iterable<Closeable>, Closeable {
private final List<Closeable> list;

private Closer(Object... other) {
list = new ArrayList<>(other.length);
if (other != null) {
list = new ArrayList<>(other.length);
} else {
list = new ArrayList<>();
}
with(other);
}

Expand Down