-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #250 #261
Fixed #250 #261
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,7 +115,7 @@ public static void zip(Map<String, ZipEntryInfo> files, OutputStream out, SIP si | |
} | ||
|
||
Set<String> nonMetsChecksumAlgorithms = new TreeSet<>(); | ||
nonMetsChecksumAlgorithms.add(IPConstants.CHECKSUM_ALGORITHM); | ||
nonMetsChecksumAlgorithms.add(sip.getChecksum()); | ||
Set<String> metsChecksumAlgorithms = new TreeSet<>(); | ||
metsChecksumAlgorithms.addAll(nonMetsChecksumAlgorithms); | ||
metsChecksumAlgorithms.addAll(sip.getExtraChecksumAlgorithms()); | ||
|
@@ -126,6 +126,7 @@ public static void zip(Map<String, ZipEntryInfo> files, OutputStream out, SIP si | |
throw new InterruptedException(); | ||
} | ||
|
||
file.setChecksum(sip.getChecksum()); | ||
file.prepareEntryforZipping(); | ||
|
||
LOGGER.debug("Zipping file {}", file.getFilePath()); | ||
|
@@ -150,8 +151,8 @@ public static void zip(Map<String, ZipEntryInfo> files, OutputStream out, SIP si | |
} | ||
|
||
LOGGER.debug("Done zipping file"); | ||
String checksum = checksums.get(IPConstants.CHECKSUM_ALGORITHM); | ||
String checksumType = IPConstants.CHECKSUM_ALGORITHM; | ||
String checksum = checksums.get(sip.getChecksum()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
String checksumType = sip.getChecksum(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
file.setChecksum(checksum); | ||
file.setChecksumAlgorithm(checksumType); | ||
if (file instanceof METSFileTypeZipEntryInfo) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,7 @@ public void prepareEntryforZipping() throws IPException { | |
if (!rootMETS && fileType != null) { | ||
METSUtils.setFileBasicInformation(LOGGER, getFilePath(), fileType); | ||
|
||
String checksumType = IPConstants.CHECKSUM_ALGORITHM; | ||
String checksumType = this.getChecksum(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Set<String> checksumAlgorithms = new HashSet<>(); | ||
checksumAlgorithms.add(checksumType); | ||
try (InputStream inputStream = Files.newInputStream(getFilePath())) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.