You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2009/02/13 17:16:38 UTC
svn commit: r744159 -
/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
Author: gnodet
Date: Fri Feb 13 16:16:38 2009
New Revision: 744159
URL: http://svn.apache.org/viewvc?rev=744159&view=rev
Log:
SMX4NMR-85: not using the original entry can lead to java.lang.IllegalArgumentException: invalid entry size in some cases
Modified:
servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java?rev=744159&r1=744158&r2=744159&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java Fri Feb 13 16:16:38 2009
@@ -89,16 +89,11 @@
JarInputStream jis = new JarInputStream(new BufferedInputStream(new FileInputStream(jbiArtifact)));
JarOutputStream jos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(osgiBundle)), m);
- jos.setMethod(JarOutputStream.STORED);
JarEntry entry = jis.getNextJarEntry();
while (entry != null) {
if (!"META-INF/MANIFEST.MF".equals(entry.getName())) {
- JarEntry newEntry = new JarEntry(entry.getName());
- newEntry.setSize(entry.getSize());
- newEntry.setCompressedSize(entry.getSize());
- newEntry.setCrc(entry.getCrc());
- jos.putNextEntry(newEntry);
+ jos.putNextEntry(entry);
FileUtil.copyInputStream(jis, jos);
jos.closeEntry();
}