From 247d843943f4e031517945c2cf828dff6ffc1a78 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Sun, 4 Feb 2001 08:30:44 +0000 Subject: [PATCH] Try to maintain the current compression setting rather than just avoiding compression, since Weblogic 6.0 generates compressed jars whereas 5.1 generates uncompressed jars git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268574 13f79535-47bb-0310-9956-ffa450edef68 --- .../taskdefs/optional/ejb/WeblogicDeploymentTool.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java index 2c7911f3d..ef4767185 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java @@ -537,7 +537,14 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { int bytesRead; InputStream is; JarEntry je = (JarEntry)e.nextElement(); - + if (je.getCompressedSize() == -1 || + je.getCompressedSize() == je.getSize()) { + newJarStream.setLevel(0); + } + else { + newJarStream.setLevel(9); + } + // Update with changed Bean class if (replaceEntries.containsKey(je.getName())) {