diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-02-25 08:50:03 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-02-25 11:05:44 +0900 |
commit | e54243278ff810ef95e26b8a15bf3aa8505a2161 (patch) | |
tree | 909e06f612fd7bfb56ea34c5e2f11ea2b650f9d9 | |
parent | a5a62a4cdbbc22df6af0638906142f3b28fbfd64 (diff) | |
download | jgit-e54243278ff810ef95e26b8a15bf3aa8505a2161.tar.gz jgit-e54243278ff810ef95e26b8a15bf3aa8505a2161.zip |
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>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java index 9fe01f1d8d..1ad6602fce 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java @@ -48,8 +48,10 @@ import static java.lang.Integer.numberOfTrailingZeros; 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 @@ public class SHA1 { 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); } } |