Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Jul 3, 2024
1 parent 0316ec3 commit 0039f55
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/net/fabricmc/loom/util/ZipReprocessorUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,11 @@ private static void copyUncompressedZipEntry(ZipOutputStream zipOutputStream, Zi
// We need to read the entire input stream to calculate the CRC32 checksum and the size of the entry.
final byte[] data = inputStream.readAllBytes();

entry.setMethod(ZipEntry.STORED);
entry.setSize(data.length);
entry.setCompressedSize(data.length);

final CRC32 crc = new CRC32();
var crc = new CRC32();
crc.update(data);
entry.setCrc(crc.getValue());
entry.setSize(data.length);
entry.setCompressedSize(data.length);

zipOutputStream.putNextEntry(entry);
zipOutputStream.write(data, 0, data.length);
Expand Down

0 comments on commit 0039f55

Please sign in to comment.