Added sonar exceptions.

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-06-02 08:50:37 +02:00
parent 935ca2f963
commit 5d17a7d5c3
5 changed files with 14 additions and 0 deletions

View File

@@ -205,6 +205,9 @@ public class ArtifactStore implements ArtifactRepository {
throws NoSuchAlgorithmException, IOException {
String sha1Hash;
// compute digest
// Exception squid:S2070 - not used for hashing sensitive
// data
@SuppressWarnings("squid:S2070")
final MessageDigest md = MessageDigest.getInstance("SHA-1");
try (final DigestOutputStream dos = new DigestOutputStream(os, md)) {
ByteStreams.copy(stream, dos);