public enum Format {
ZIP,
TAR
- };
+ }
private static interface Archiver {
ArchiveOutputStream createArchiveOutputStream(OutputStream s);
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);
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;