Skip to content

Commit 8fd2526

Browse files
veloCopilot
andauthored
Update flink-sql-runner/src/test/java/com/datasqrl/FlinkMainIT.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 831c010 commit 8fd2526

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

flink-sql-runner/src/test/java/com/datasqrl/FlinkMainIT.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,9 @@ private int instrument(final File src, final File dest) throws IOException {
257257
var instrumenter = new Instrumenter(new OfflineInstrumentationAccessGenerator());
258258

259259
dest.getParentFile().mkdirs();
260-
final InputStream input = new FileInputStream(src);
261-
try {
262-
final OutputStream output = new FileOutputStream(dest);
263-
try {
264-
return instrumenter.instrumentAll(input, output, src.getAbsolutePath());
265-
} finally {
266-
output.close();
267-
}
260+
try (final InputStream input = new FileInputStream(src);
261+
final OutputStream output = new FileOutputStream(dest)) {
262+
return instrumenter.instrumentAll(input, output, src.getAbsolutePath());
268263
} catch (final IOException e) {
269264
dest.delete();
270265
throw e;

0 commit comments

Comments
 (0)