Skip to content

Commit

Permalink
Merge pull request #39747 from dmlloyd/jdk-8242879
Browse files Browse the repository at this point in the history
Drop usage of `wrapForJDK8232879`
  • Loading branch information
gsmet authored Mar 28, 2024
2 parents 18d873e + e4e371d commit 5d5bb73
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.quarkus.deployment.pkg.steps;

import static io.quarkus.deployment.pkg.PackageConfig.JarConfig.JarType.*;
import static io.quarkus.fs.util.ZipUtils.wrapForJDK8232879;

import java.io.BufferedInputStream;
import java.io.BufferedWriter;
Expand Down Expand Up @@ -1175,7 +1174,7 @@ private void copyCommonContent(FileSystem runnerZipFs, Map<String, List<byte[]>>
if (i.getData() != null) {
Path target = runnerZipFs.getPath(i.getFileName());
handleParent(runnerZipFs, i.getFileName(), seen);
try (final OutputStream out = wrapForJDK8232879(Files.newOutputStream(target))) {
try (final OutputStream out = Files.newOutputStream(target)) {
out.write(i.getData());
}
seen.put(i.getFileName(), "Current Application");
Expand All @@ -1190,7 +1189,7 @@ private void copyCommonContent(FileSystem runnerZipFs, Map<String, List<byte[]>>
if (Files.exists(target)) {
continue;
}
try (final OutputStream os = wrapForJDK8232879(Files.newOutputStream(target))) {
try (final OutputStream os = Files.newOutputStream(target)) {
os.write(i.getClassData());
}
}
Expand All @@ -1207,7 +1206,7 @@ private void copyCommonContent(FileSystem runnerZipFs, Map<String, List<byte[]>>
if (i.getName().startsWith("META-INF/services/")) {
concatenatedEntries.computeIfAbsent(i.getName(), (u) -> new ArrayList<>()).add(i.getData());
} else {
try (final OutputStream os = wrapForJDK8232879(Files.newOutputStream(target))) {
try (final OutputStream os = Files.newOutputStream(target)) {
os.write(i.getData());
}
}
Expand All @@ -1216,8 +1215,7 @@ private void copyCommonContent(FileSystem runnerZipFs, Map<String, List<byte[]>>
copyFiles(appArchives.getRootArchive(), runnerZipFs, concatenatedEntries, ignoredEntriesPredicate);

for (Map.Entry<String, List<byte[]>> entry : concatenatedEntries.entrySet()) {
try (final OutputStream os = wrapForJDK8232879(
Files.newOutputStream(runnerZipFs.getPath(entry.getKey())))) {
try (final OutputStream os = Files.newOutputStream(runnerZipFs.getPath(entry.getKey()))) {
// TODO: Handle merging of XMLs
for (byte[] i : entry.getValue()) {
os.write(i);
Expand Down Expand Up @@ -1331,7 +1329,7 @@ private void generateManifest(FileSystem runnerZipFs, final String classPath, Pa
attribs.putValue(entry.getKey(), entry.getValue());
}
}
try (final OutputStream os = wrapForJDK8232879(Files.newOutputStream(manifestPath))) {
try (final OutputStream os = Files.newOutputStream(manifestPath)) {
manifest.write(os);
}
}
Expand Down

0 comments on commit 5d5bb73

Please sign in to comment.