Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

STORED entries must always have the same csize as size

  • Loading branch information...
commit 19021328783c61a07df9ab87679960ab177f08c3 1 parent 0297268
@n1hility n1hility authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/main/java/org/jboss/jandex/JarIndexer.java
View
3  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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.