]> source.dussan.org Git - jgit.git/commitdiff
Fix empty control block warnings 76/9176/1
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 12 Dec 2012 07:31:45 +0000 (08:31 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 12 Dec 2012 07:31:45 +0000 (08:31 +0100)
Change-Id: I7c546fa89f5e1933cff6648b2e03e07db61273e8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java

index b886be853742c9171372d300903794e2b4ba2768..7a2d5de75ee882078fee5165ff7b385503b79be1 100644 (file)
@@ -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;