Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix copying of archives that use a different deflation alg than the copy

  • Loading branch information...
commit 029726860cecf80089acf6aebb6f4ed660af06c3 1 parent ecb3994
Jason T. Greene n1hility authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/org/jboss/jandex/
5 src/main/java/org/jboss/jandex/
@@ -52,7 +52,10 @@ public static Result createJarIndex(File jarFile, Indexer indexer, boolean modif
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
if (modify) {
- zo.putNextEntry(entry);
+ JarEntry clone = (JarEntry) entry.clone();
+ // Compression level and format can vary across implementations
+ clone.setCompressedSize(-1);
+ zo.putNextEntry(clone);
copy(jar.getInputStream(entry), zo);
Please sign in to comment.
Something went wrong with that request. Please try again.