diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2015-03-12 14:19:26 -0700 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-03-12 18:35:47 -0700 |
commit | 3ac06ca6de3fc175ddac5e16d5313bf84b70936f (patch) | |
tree | 847b7b5d6ca7e114abdafeaaa3458c185bb1a47e /org.eclipse.jgit.archive/src/org/eclipse/jgit | |
parent | 994b39a007d17ae058496cfadbc3d50003b55ad2 (diff) | |
download | jgit-3ac06ca6de3fc175ddac5e16d5313bf84b70936f.tar.gz jgit-3ac06ca6de3fc175ddac5e16d5313bf84b70936f.zip |
Fix string externalization warnings in BaseFormat
Change-Id: Ie40aa1f889191e45e4d4a7a144c3176d521f6cfa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.archive/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java | 10 | ||||
-rw-r--r-- | org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/internal/ArchiveText.java | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java index f47fa12a44..e80d42143e 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java @@ -45,9 +45,11 @@ package org.eclipse.jgit.archive; import java.beans.Statement; import java.io.IOException; +import java.text.MessageFormat; import java.util.Map; import org.apache.commons.compress.archivers.ArchiveOutputStream; +import org.eclipse.jgit.archive.internal.ArchiveText; import org.eclipse.jgit.util.StringUtils; /** @@ -71,11 +73,11 @@ public class BaseFormat { Map<String, Object> o) throws IOException { for (Map.Entry<String, Object> p : o.entrySet()) { try { - new Statement(s, - "set" + StringUtils.capitalize(p.getKey()), - new Object[]{p.getValue()}).execute(); + new Statement(s, "set" + StringUtils.capitalize(p.getKey()), //$NON-NLS-1$ + new Object[] { p.getValue() }).execute(); } catch (Exception e) { - throw new IOException("cannot set option: " + p.getKey(), e); + throw new IOException(MessageFormat.format( + ArchiveText.get().cannotSetOption, p.getKey()), e); } } return s; diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/internal/ArchiveText.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/internal/ArchiveText.java index edadf1c81d..f631cf8ecf 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/internal/ArchiveText.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/internal/ArchiveText.java @@ -58,6 +58,7 @@ public class ArchiveText extends TranslationBundle { } // @formatter:off + /***/ public String cannotSetOption; /***/ public String pathDoesNotMatchMode; /***/ public String unsupportedMode; } |