]> source.dussan.org Git - jgit.git/commitdiff
InvalidLongObjectIdException: Fix formatting of message 77/112977/3
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 7 Dec 2017 00:51:56 +0000 (09:51 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 7 Dec 2017 11:02:59 +0000 (20:02 +0900)
The message is formatted as:

  Invalid id: : abcde...

but should be:

  Invalid id: abcde...

Change-Id: Ie15cacdcf2f168edaee262e6cf8061ebfe9d998d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/InvalidLongObjectIdException.java

index 0f7004b5c4542c255adf64acc262e13e32619246..33ba2de80362125b892f8d381f088d0bccaa1392 100644 (file)
@@ -94,7 +94,7 @@ public class DownloadTest extends LfsServerTest {
                String TEXT = "test";
                String id = putContent(TEXT).name().replace('f', 'z');
                Path f = Paths.get(getTempDirectory().toString(), "download");
-               String error = String.format("Invalid id: %s", id);
+               String error = String.format("Invalid id: %s", id);
                exception.expect(RuntimeException.class);
                exception.expectMessage(
                                formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error));
index 1f6e2d174fb3c2279124e52bf62f1d8db2304d84..44ac317a16c9526ce39d05541465e63e18da1308 100644 (file)
@@ -80,7 +80,7 @@ public class InvalidLongObjectIdException extends IllegalArgumentException {
 
        private static String asAscii(byte[] bytes, int offset, int length) {
                try {
-                       return ": " + new String(bytes, offset, length, "US-ASCII"); //$NON-NLS-1$ //$NON-NLS-2$
+                       return new String(bytes, offset, length, "US-ASCII"); //$NON-NLS-1$
                } catch (UnsupportedEncodingException e2) {
                        return ""; //$NON-NLS-1$
                } catch (StringIndexOutOfBoundsException e2) {