Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @param <V> type of values
* @author Markus Michael Geipel
*/
public abstract class AbstractReadOnlyMap<K, V> implements Map<K, V> {
public abstract class AbstractReadOnlyMap<K, V> implements Map<K, V>, AutoCloseable {

@Override
public final int size() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,9 @@ public Set<String> keySet() {
return Collections.unmodifiableSet(map.keySet());
}

@Override
public void close() throws IOException {
map.clear();
fileOpener.closeStream();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,8 @@ public void setCharsetName(final String name) {
charsetName = name;
}

@Override
public void close() throws IOException {

}
}
Loading