diff --git a/resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/zip/ZipFileStore.java b/resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/zip/ZipFileStore.java index c04fe4c9bf4..9fe5829f781 100644 --- a/resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/zip/ZipFileStore.java +++ b/resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/zip/ZipFileStore.java @@ -454,7 +454,7 @@ public InputStream openInputStream(int options, IProgressMonitor monitor) throws public OutputStream openOutputStream(int options, IProgressMonitor monitor) { // Creating a ByteArrayOutputStream to capture the data written to the // OutputStream - ByteArrayOutputStream baos = new ByteArrayOutputStream() { + return new ByteArrayOutputStream() { @Override public void close() throws IOException { try (FileSystem zipFs = openZipFileSystem()) { @@ -473,8 +473,6 @@ public void close() throws IOException { } } }; - - return baos; } private FileSystem openZipFileSystem() throws URISyntaxException, IOException {