Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2012-12-15 08:09:14 -0500
committerGerrit Code Review @ Eclipse.org2012-12-15 08:09:14 -0500
commit3154f3c5bbc9f1e6aaf5fd4d869c7cfb5a6abb4e (patch)
treeb433d0b7e16cf8261e2b11f3b3073cd409bb681c
parentaf54f16635f4d164ca22c0c9b264bc14c2b5ccd0 (diff)
parent7b1d7ac90e86b058596a7d2996fdf186db5a59c6 (diff)
downloadjgit-3154f3c5bbc9f1e6aaf5fd4d869c7cfb5a6abb4e.tar.gz
jgit-3154f3c5bbc9f1e6aaf5fd4d869c7cfb5a6abb4e.tar.xz
jgit-3154f3c5bbc9f1e6aaf5fd4d869c7cfb5a6abb4e.zip
Merge "Fix empty control block warnings" into stable-2.2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
index b886be8537..7a2d5de75e 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
@@ -115,7 +115,7 @@ class Archive extends TextBuiltin {
public enum Format {
ZIP,
TAR
- };
+ }
private static interface Archiver {
ArchiveOutputStream createArchiveOutputStream(OutputStream s);
@@ -137,13 +137,14 @@ class Archive extends TextBuiltin {
throws IOException {
final ZipArchiveEntry entry = new ZipArchiveEntry(path);
- if (mode == FileMode.REGULAR_FILE)
- ; // ok
- else if (mode == FileMode.EXECUTABLE_FILE ||
- mode == FileMode.SYMLINK)
+ if (mode == FileMode.REGULAR_FILE) {
+ // ok
+ } else if (mode == FileMode.EXECUTABLE_FILE
+ || mode == FileMode.SYMLINK) {
entry.setUnixMode(mode.getBits());
- else
+ } else {
warnArchiveEntryModeIgnored(path);
+ }
entry.setSize(loader.getSize());
out.putArchiveEntry(entry);
loader.copyTo(out);
@@ -162,7 +163,7 @@ class Archive extends TextBuiltin {
final TarArchiveEntry entry = new TarArchiveEntry( //
path, TarConstants.LF_SYMLINK);
entry.setLinkName(new String( //
- loader.getCachedBytes(100), "UTF-8"));
+ loader.getCachedBytes(100), "UTF-8")); //$NON-NLS-1$
out.putArchiveEntry(entry);
out.closeArchiveEntry();
return;

Back to the top