jos.closeEntry();
}
}
private static boolean checksumValid(File libPath, List<String> checksums) {
try {
<BUG>byte[] fileData = IOUtils.getBytesFromStream(FileUtils.openInputStream(libPath));
</BUG>
boolean valid = (checksums == null) || (checksums.isEmpty()) || (checksums.contains(DigestUtils.sha1Hex(fileData)));
if ((!valid) && (libPath.getName().endsWith(".jar")))
valid = validateJar(libPath, fileData, checksums);

jos.closeEntry();
}
}
private static boolean checksumValid(File libPath, List<String> checksums) {
try {
byte[] fileData = IOUtils.readFully(FileUtils.openInputStream(libPath)).toByteArray();
boolean valid = (checksums == null) || (checksums.isEmpty()) || (checksums.contains(DigestUtils.sha1Hex(fileData)));
if ((!valid) && (libPath.getName().endsWith(".jar")))
valid = validateJar(libPath, fileData, checksums);
