diff --git a/org.eclipse.jgit.archive/resources/org/eclipse/jgit/archive/internal/ArchiveText.properties b/org.eclipse.jgit.archive/resources/org/eclipse/jgit/archive/internal/ArchiveText.properties index fecf99e57..3b50bb4fd 100644 --- a/org.eclipse.jgit.archive/resources/org/eclipse/jgit/archive/internal/ArchiveText.properties +++ b/org.eclipse.jgit.archive/resources/org/eclipse/jgit/archive/internal/ArchiveText.properties @@ -1,2 +1,3 @@ +cannotSetOption=Cannot set option: {0} pathDoesNotMatchMode=Path {0} does not match mode {1} unsupportedMode=Unsupported mode {0} 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 f47fa12a4..e80d42143 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 o) throws IOException { for (Map.Entry 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 edadf1c81..f631cf8ec 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; }