diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2013-06-09 23:35:41 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2013-06-10 22:15:29 +0200 |
commit | 06ba0f6df15868e3d2e1cb0b5f928a68b2f188bb (patch) | |
tree | 639f179abb23712b1b2889008b92d73d59d09817 /org.eclipse.jgit | |
parent | 1153a59e3820ebcba8b6871ae09304015c1d6f89 (diff) | |
download | jgit-06ba0f6df15868e3d2e1cb0b5f928a68b2f188bb.tar.gz jgit-06ba0f6df15868e3d2e1cb0b5f928a68b2f188bb.zip |
Fix warnings in ArchiveCommand
- remove unnecessary imports
- fix NLS warnings
- add missing Javadoc tag
Bug: 410354
Change-Id: I2b78a2c0e92c740bed80558b17a2100c1c884416
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java index ab94d3a80d..3ae0666b45 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java @@ -46,13 +46,9 @@ import java.io.Closeable; import java.io.IOException; import java.io.OutputStream; import java.text.MessageFormat; -import java.util.Collection; -import java.util.Iterator; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.GitCommand; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.internal.JGitText; @@ -243,7 +239,7 @@ public class ArchiveCommand extends GitCommand<OutputStream> { for (String sfx : fmt.suffixes()) if (filenameSuffix.endsWith(sfx)) return fmt; - return lookupFormat("tar"); + return lookupFormat("tar"); //$NON-NLS-1$ } private static Format<?> lookupFormat(String formatName) throws UnsupportedFormatException { @@ -334,20 +330,20 @@ public class ArchiveCommand extends GitCommand<OutputStream> { } /** - * Set the intended filename for the produced archive. - * Currently the only effect is to determine the default - * archive format when none is specified with - * {@link #setFormat(String)}. + * Set the intended filename for the produced archive. Currently the only + * effect is to determine the default archive format when none is specified + * with {@link #setFormat(String)}. * * @param filename - * intended filename for the archive + * intended filename for the archive + * @return this */ public ArchiveCommand setFilename(String filename) { int slash = filename.lastIndexOf('/'); int dot = filename.indexOf('.', slash + 1); if (dot == -1) - this.suffix = ""; + this.suffix = ""; //$NON-NLS-1$ else this.suffix = filename.substring(dot); return this; |