1 parent 95a6334 commit f8ecd56Copy full SHA for f8ecd56
1 file changed
src/main/java/io/delta/sharing/java/DeltaSharing.java
@@ -217,8 +217,9 @@ private List<Path> getCheckpointPaths(List<AddFile> files) {
217
@SuppressWarnings("UnnecessaryLocalVariable")
218
public TableReader<GenericRecord> getTableReader(Table table) throws IOException, URISyntaxException {
219
List<AddFile> files = getFiles(table, new LinkedList<>());
220
- DeltaSharingFileSystem fs = new DeltaSharingFileSystem();
221
- fs.setConf(new Configuration());
+ try (DeltaSharingFileSystem fs = new DeltaSharingFileSystem()) {
+ fs.setConf(new Configuration());
222
+ }
223
String uniqueRef = getCoordinates(table);
224
List<Path> paths;
225
DeltaTableMetadata newMetadata = this.getMetadata(table);
0 commit comments