Skip to content

Commit

Permalink
JCR-4004: Log exception in AbstractDataStore.getReferenceFromIdentifi…
Browse files Browse the repository at this point in the history
…er()

Apply changes suggested by Woonsan Ko

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1757125 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mreutegg committed Aug 22, 2016
1 parent 53a9770 commit 3ec27de
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@
package org.apache.jackrabbit.core.data;

import java.security.SecureRandom;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public abstract class AbstractDataStore implements DataStore {

private static Logger LOG = LoggerFactory.getLogger(AbstractDataStore.class);

private static final String ALGORITHM = "HmacSHA1";

/**
Expand Down Expand Up @@ -91,7 +97,7 @@ protected String getReferenceFromIdentifier(DataIdentifier identifier) {

return id + ':' + encodeHexString(hash);
} catch (Exception e) {
// TODO: log a warning about this exception
LOG.error("Failed to hash identifier using MAC (Message Authentication Code) algorithm.", e);
}
return null;
}
Expand Down

0 comments on commit 3ec27de

Please sign in to comment.