diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-12-14 22:10:12 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-12-14 22:10:12 +0100 |
commit | 57f22d6db1e76720fffaafe0db6c1c3964f8b9a1 (patch) | |
tree | b56cc996ef8041923e5748f3d50f9af74dc5a2e5 /org.eclipse.jgit | |
parent | ecba5e48bb4a659565bfbd1bbf09f212241f395d (diff) | |
download | jgit-57f22d6db1e76720fffaafe0db6c1c3964f8b9a1.tar.gz jgit-57f22d6db1e76720fffaafe0db6c1c3964f8b9a1.zip |
Externalize error message in FileRepository#convertRefStorage
Change-Id: I5d3acaa883ee7eb8d244b55b3e708cbe018690c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
3 files changed, 4 insertions, 3 deletions
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 27d3e6aaa3..c80d616859 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -719,6 +719,7 @@ unknownObject=unknown object unknownObjectInIndex=unknown object {0} found in index but not in pack file unknownObjectType=Unknown object type {0}. unknownObjectType2=unknown +unknownRefStorageFormat=Unknown ref storage format "{0}" unknownRepositoryFormat=Unknown repository format unknownRepositoryFormat2=Unknown repository format "{0}"; expected "0". unknownTransportCommand=unknown command {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 0cea60fd95..e8ee8b4050 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -780,6 +780,7 @@ public class JGitText extends TranslationBundle { /***/ public String unknownObjectInIndex; /***/ public String unknownObjectType; /***/ public String unknownObjectType2; + /***/ public String unknownRefStorageFormat; /***/ public String unknownRepositoryFormat; /***/ public String unknownRepositoryFormat2; /***/ public String unknownTransportCommand; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java index 2f6ef51133..92d5d24d0b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java @@ -788,7 +788,6 @@ public class FileRepository extends Repository { * @throws IOException * on I/O problems. */ - @SuppressWarnings("nls") public void convertRefStorage(String format, boolean writeLogs, boolean backup) throws IOException { if (format.equals("reftable")) { //$NON-NLS-1$ @@ -800,8 +799,8 @@ public class FileRepository extends Repository { convertToPackedRefs(backup); } } else { - throw new IOException(String.format( - "unknown supported ref storage format '%s'", format)); + throw new IOException(MessageFormat + .format(JGitText.get().unknownRefStorageFormat, format)); } } } |