mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Reduced verification allocations
- Dependency hashing reuses one read buffer per artifact - Hash tests cover large, short, and empty entries
This commit is contained in:
1 parent
463feea60b
commit
dc1c90f63f
2 files changed
+17
-1
No files matched your search
@@ -231,11 +231,11 @@ public final class GenerationBuildRevision {
|
||||
throw new IOException("Duplicate dependency artifact entry: " + name);
|
||||
}
|
||||
}
|
||||
byte[] buffer = new byte[16 * 1024];
|
||||
for (Map.Entry<String, ZipEntry> entry : entries.entrySet()) {
|
||||
update(digest, entry.getKey());
|
||||
try (InputStream input = zip.getInputStream(entry.getValue())) {
|
||||
MessageDigest content = digest();
|
||||
byte[] buffer = new byte[16 * 1024];
|
||||
int read;
|
||||
while ((read = input.read(buffer)) != -1) {
|
||||
content.update(buffer, 0, read);
|
||||
|
||||
Reference in new issue
Block a user