Skip to content

Commit 3d06571

Browse files
committed
close resources in case of failure
1 parent 01dde05 commit 3d06571

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/CategorizeBlockHash.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public class CategorizeBlockHash extends BlockHash {
8181
);
8282

8383
if (aggregatorMode.isInputPartial() == false) {
84-
Objects.requireNonNull(analysisRegistry);
8584
CategorizationAnalyzer analyzer;
8685
try {
86+
Objects.requireNonNull(analysisRegistry);
8787
analyzer = new CategorizationAnalyzer(analysisRegistry, ANALYZER_CONFIG);
88-
} catch (IOException e) {
88+
} catch (Exception e) {
8989
categorizer.close();
9090
throw new RuntimeException(e);
9191
}

0 commit comments

Comments
 (0)