Fix string externalization warnings in BaseFormat
Change-Id: Ie40aa1f889191e45e4d4a7a144c3176d521f6cfa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
994b39a007
commit
3ac06ca6de
|
@ -1,2 +1,3 @@
|
||||||
|
cannotSetOption=Cannot set option: {0}
|
||||||
pathDoesNotMatchMode=Path {0} does not match mode {1}
|
pathDoesNotMatchMode=Path {0} does not match mode {1}
|
||||||
unsupportedMode=Unsupported mode {0}
|
unsupportedMode=Unsupported mode {0}
|
||||||
|
|
|
@ -45,9 +45,11 @@
|
||||||
|
|
||||||
import java.beans.Statement;
|
import java.beans.Statement;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.MessageFormat;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.compress.archivers.ArchiveOutputStream;
|
import org.apache.commons.compress.archivers.ArchiveOutputStream;
|
||||||
|
import org.eclipse.jgit.archive.internal.ArchiveText;
|
||||||
import org.eclipse.jgit.util.StringUtils;
|
import org.eclipse.jgit.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,11 +73,11 @@ protected ArchiveOutputStream applyFormatOptions(ArchiveOutputStream s,
|
||||||
Map<String, Object> o) throws IOException {
|
Map<String, Object> o) throws IOException {
|
||||||
for (Map.Entry<String, Object> p : o.entrySet()) {
|
for (Map.Entry<String, Object> p : o.entrySet()) {
|
||||||
try {
|
try {
|
||||||
new Statement(s,
|
new Statement(s, "set" + StringUtils.capitalize(p.getKey()), //$NON-NLS-1$
|
||||||
"set" + StringUtils.capitalize(p.getKey()),
|
new Object[] { p.getValue() }).execute();
|
||||||
new Object[]{p.getValue()}).execute();
|
|
||||||
} catch (Exception e) {
|
} 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;
|
return s;
|
||||||
|
|
|
@ -58,6 +58,7 @@ public static ArchiveText get() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
|
/***/ public String cannotSetOption;
|
||||||
/***/ public String pathDoesNotMatchMode;
|
/***/ public String pathDoesNotMatchMode;
|
||||||
/***/ public String unsupportedMode;
|
/***/ public String unsupportedMode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue