-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from DataONEorg/feature-114-nmce-includecheck…
…sums Feature-114: NonMatchingChecksumException hexDigests Inclusion
- Loading branch information
Showing
5 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
10 changes: 9 additions & 1 deletion
10
src/main/java/org/dataone/hashstore/exceptions/NonMatchingChecksumException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
package org.dataone.hashstore.exceptions; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* An exception thrown when a checksum does not match what is expected. | ||
*/ | ||
|
||
public class NonMatchingChecksumException extends IllegalArgumentException { | ||
|
||
public NonMatchingChecksumException(String message) { | ||
private final Map<String, String> hexDigests; | ||
|
||
public NonMatchingChecksumException(String message, Map<String, String> checksumMap) { | ||
super(message); | ||
this.hexDigests = checksumMap; | ||
} | ||
|
||
public Map<String, String> getHexDigests() { | ||
return hexDigests; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters