Permalink
Browse files

STORED entries must always have the same csize as size

  • Loading branch information...
1 parent 0297268 commit 19021328783c61a07df9ab87679960ab177f08c3 @n1hility n1hility committed Oct 13, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/org/jboss/jandex/JarIndexer.java
@@ -54,7 +54,8 @@ public static Result createJarIndex(File jarFile, Indexer indexer, boolean modif
if (modify) {
JarEntry clone = (JarEntry) entry.clone();
// Compression level and format can vary across implementations
- clone.setCompressedSize(-1);
+ if (clone.getMethod() != ZipEntry.STORED)
+ clone.setCompressedSize(-1);
zo.putNextEntry(clone);
copy(jar.getInputStream(entry), zo);
}

0 comments on commit 1902132

Please sign in to comment.