Skip to content

Commit 28136bc

Browse files
committed
CacheRegion: fix non translatable text warnings
Change-Id: I163957653b075f1f05a6219f4d23b340588ffcbd
1 parent 1468a80 commit 28136bc

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ branchNameInvalid=Branch name {0} is not allowed
7676
buildingBitmaps=Building bitmaps
7777
cachedPacksPreventsIndexCreation=Using cached packs prevents index creation
7878
cachedPacksPreventsListingObjects=Using cached packs prevents listing objects
79+
cacheRegionAllOrNoneNull=expected all null or none: {0}, {1}
7980
cannotAccessLastModifiedForSafeDeletion=Unable to access lastModifiedTime of file {0}, skip deletion since we cannot safely avoid race condition
8081
cannotBeCombined=Cannot be combined.
8182
cannotBeRecursiveWhenTreesAreIncluded=TreeWalk shouldn't be recursive when tree objects are included.

org.eclipse.jgit/src/org/eclipse/jgit/blame/cache/CacheRegion.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
*/
1010
package org.eclipse.jgit.blame.cache;
1111

12+
import java.text.MessageFormat;
13+
14+
import org.eclipse.jgit.internal.JGitText;
1215
import org.eclipse.jgit.lib.ObjectId;
1316

1417
/**
@@ -92,6 +95,7 @@ public int compareTo(CacheRegion o) {
9295
return start - o.start;
9396
}
9497

98+
@SuppressWarnings("nls")
9599
@Override
96100
public String toString() {
97101
StringBuilder sb = new StringBuilder();
@@ -115,7 +119,7 @@ private static void allOrNoneNull(String path, ObjectId commit) {
115119
if (path == null && commit == null) {
116120
return;
117121
}
118-
throw new IllegalArgumentException(String.format(
119-
"expected all null or none: %s, %s", path, commit));
122+
throw new IllegalArgumentException(MessageFormat
123+
.format(JGitText.get().cacheRegionAllOrNoneNull, path, commit));
120124
}
121125
}

org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public static JGitText get() {
106106
/***/ public String buildingBitmaps;
107107
/***/ public String cachedPacksPreventsIndexCreation;
108108
/***/ public String cachedPacksPreventsListingObjects;
109+
/***/ public String cacheRegionAllOrNoneNull;
109110
/***/ public String cannotAccessLastModifiedForSafeDeletion;
110111
/***/ public String cannotBeCombined;
111112
/***/ public String cannotBeRecursiveWhenTreesAreIncluded;

0 commit comments

Comments
 (0)