From e4abd0123bb982dc74432190445d2e53933a27e4 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 29 Nov 2023 00:12:55 +0100 Subject: [PATCH] BitmapIndexImpl: externalize error message Change-Id: I5189e966aecc57fe7c3e6c3f7f8e6b16917ee27f --- .../resources/org/eclipse/jgit/internal/JGitText.properties | 1 + org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java | 1 + .../org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index c8a3abf1c4..3798e3f5f8 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -66,6 +66,7 @@ binaryHunkLineTooShort=Binary hunk, line {0}: input ended prematurely binaryHunkMissingNewline=Binary hunk, line {0}: input line not terminated by newline bitmapMissingObject=Bitmap at {0} is missing {1}. bitmapsMustBePrepared=Bitmaps must be prepared before they may be written. +bitmapUseNoopNoListener=Use NOOP instance for no listener blameNotCommittedYet=Not Committed Yet blockLimitNotMultipleOfBlockSize=blockLimit {0} must be a multiple of blockSize {1} blockLimitNotPositive=blockLimit must be positive: {0} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index 15e7f0e565..c8509121b4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -96,6 +96,7 @@ public class JGitText extends TranslationBundle { /***/ public String binaryHunkMissingNewline; /***/ public String bitmapMissingObject; /***/ public String bitmapsMustBePrepared; + /***/ public String bitmapUseNoopNoListener; /***/ public String blameNotCommittedYet; /***/ public String blockLimitNotMultipleOfBlockSize; /***/ public String blockLimitNotPositive; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java index 5602158d2d..01bd8268b8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java @@ -76,7 +76,7 @@ public class BitmapIndexImpl implements BitmapIndex { public void addBitmapLookupListener(BitmapLookupListener listener) { if (listener == null) { throw new IllegalArgumentException( - "Use NOOP instance for no listener"); // @NON-NLS-1@ + JGitText.get().bitmapUseNoopNoListener); } this.listener = listener; } -- 2.39.5