SHA1: Use externalized message in log
The non-externalized warning message says there is a "possible SHA-1 collision" but then the Sha1CollisionException is always thrown. Replace the message with the existing externalised string that does not say "possible". Change-Id: I9773ec76b416c356e234a658fb119f98d33eac83 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
a5a62a4cdb
commit
e54243278f
|
@ -48,8 +48,10 @@
|
|||
import static java.lang.Integer.rotateLeft;
|
||||
import static java.lang.Integer.rotateRight;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.jgit.internal.JGitText;
|
||||
import org.eclipse.jgit.lib.MutableObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
@ -497,7 +499,8 @@ private void finish() {
|
|||
|
||||
if (foundCollision) {
|
||||
ObjectId id = h.toObjectId();
|
||||
LOG.warn("possible SHA-1 collision " + id.name()); //$NON-NLS-1$
|
||||
LOG.warn(MessageFormat.format(JGitText.get().sha1CollisionDetected,
|
||||
id.name()));
|
||||
throw new Sha1CollisionException(id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue