Fix empty control block warnings
Change-Id: I7c546fa89f5e1933cff6648b2e03e07db61273e8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
138a2b06c8
commit
7b1d7ac90e
|
@ -115,7 +115,7 @@ static private void warnArchiveEntryModeIgnored(String name) {
|
|||
public enum Format {
|
||||
ZIP,
|
||||
TAR
|
||||
};
|
||||
}
|
||||
|
||||
private static interface Archiver {
|
||||
ArchiveOutputStream createArchiveOutputStream(OutputStream s);
|
||||
|
@ -137,13 +137,14 @@ public void putEntry(String path, FileMode mode, //
|
|||
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 @@ public void putEntry(String path, FileMode mode, //
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue