]> source.dussan.org Git - jgit.git/commitdiff
CommitGraphWriter: fix boxing warnings 25/204525/1
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 22 Sep 2023 14:50:24 +0000 (16:50 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 22 Sep 2023 15:00:15 +0000 (17:00 +0200)
Change-Id: I35c3a3baadb8d7d73c01252fe4333fa2159722ee

org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java

index 141ea8e201b631afa2c396a0d00290992326f7f4..a7a7f18804056b7678e3b3b57e7b14bc062f2349 100644 (file)
@@ -158,6 +158,7 @@ commitGraphChunkNeeded=commit-graph 0x{0} chunk has not been loaded
 commitGraphChunkRepeated=commit-graph chunk id 0x{0} appears multiple times
 commitGraphChunkUnknown=unknown commit-graph chunk: 0x{0}
 commitGraphFileIsTooLargeForJgit=commit-graph file is too large for jgit
+commitGraphUnexpectedSize=Commit-graph: expected %d bytes but out has %d bytes
 commitGraphWritingCancelled=commit-graph writing was canceled
 commitMessageNotSpecified=commit message not specified
 commitOnRepoWithoutHEADCurrentlyNotSupported=Commit on repo without HEAD currently not supported
index f0d6657336f5489b7544be8af66492269c7d6692..f42e3340497fb4be6fb5026c5b07571270367e5a 100644 (file)
@@ -187,6 +187,7 @@ public class JGitText extends TranslationBundle {
        /***/ public String commitGraphChunkRepeated;
        /***/ public String commitGraphChunkUnknown;
        /***/ public String commitGraphFileIsTooLargeForJgit;
+       /***/ public String commitGraphUnexpectedSize;
        /***/ public String commitGraphWritingCancelled;
        /***/ public String commitMessageNotSpecified;
        /***/ public String commitOnRepoWithoutHEADCurrentlyNotSupported;
index 38ae02957d25a63aab82c45b4ed0462bad0055bc..ae7b379c1caa223f23faa48a5712fa45c5799568 100644 (file)
@@ -146,8 +146,9 @@ public class CommitGraphWriter {
                        writeCheckSum(out);
                        if (expectedSize != out.length()) {
                                throw new IllegalStateException(String.format(
-                                               "Commit-graph: expected %d bytes but out has %d bytes", //$NON-NLS-1$
-                                               expectedSize, out.length()));
+                                               JGitText.get().commitGraphUnexpectedSize,
+                                               Long.valueOf(expectedSize),
+                                               Long.valueOf(out.length())));
                        }
                } catch (InterruptedIOException e) {
                        throw new IOException(JGitText.get().commitGraphWritingCancelled,