Author: rgoers Date: Mon Nov 15 01:25:02 2010 New Revision: 1035116 URL: http://svn.apache.org/viewvc?rev=1035116&view=rev Log: More checkstyle errors fixed
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/BZip2Constants.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2InputStream.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2OutputStream.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CRC.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientWrapper.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/ThreadLocalHttpConnectionManager.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarConstants.java Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java Mon Nov 15 01:25:02 2010 @@ -583,16 +583,15 @@ public final class DefaultFileContent im * An input stream for reading content. Provides buffering, and * end-of-stream monitoring. */ - private final class FileContentInputStream - extends MonitorInputStream + private final class FileContentInputStream extends MonitorInputStream { // avoid gc - private final FileObject _file; + private final FileObject file; FileContentInputStream(final FileObject file, final InputStream instr) { super(instr); - this._file = file; + this.file = file; } /** @@ -607,7 +606,7 @@ public final class DefaultFileContent im } catch (final IOException e) { - throw new FileSystemException("vfs.provider/close-instr.error", _file, e); + throw new FileSystemException("vfs.provider/close-instr.error", file, e); } } @@ -635,14 +634,15 @@ public final class DefaultFileContent im { // avoid gc @SuppressWarnings("unused") - private final FileObject _file; + private final FileObject file; + @SuppressWarnings("unused") private final RandomAccessContent content; FileRandomAccessContent(final FileObject file, final RandomAccessContent content) { super(content); - this._file = file; + this.file = file; this.content = content; } @@ -669,12 +669,12 @@ public final class DefaultFileContent im final class FileContentOutputStream extends MonitorOutputStream { // avoid gc - private final FileObject _file; + private final FileObject file; FileContentOutputStream(final FileObject file, final OutputStream outstr) { super(outstr); - this._file = file; + this.file = file; } /** @@ -689,7 +689,7 @@ public final class DefaultFileContent im } catch (final IOException e) { - throw new FileSystemException("vfs.provider/close-outstr.error", _file, e); + throw new FileSystemException("vfs.provider/close-outstr.error", file, e); } } @@ -711,7 +711,7 @@ public final class DefaultFileContent im } catch (Exception e) { - throw new FileSystemException("vfs.provider/close-outstr.error", _file, e); + throw new FileSystemException("vfs.provider/close-outstr.error", file, e); } } } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/BZip2Constants.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/BZip2Constants.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/BZip2Constants.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/BZip2Constants.java Mon Nov 15 01:25:02 2010 @@ -29,20 +29,20 @@ package org.apache.commons.vfs2.provider * * @author <a href="mailto:kei...@aftexsw.com">Keiron Liddle</a> */ -interface BZip2Constants +final class BZip2Constants { - int BASE_BLOCK_SIZE = 100000; - int MAX_ALPHA_SIZE = 258; - int MAX_CODE_LEN = 23; - int RUNA = 0; - int RUNB = 1; - int N_GROUPS = 6; - int G_SIZE = 50; - int N_ITERS = 4; - int MAX_SELECTORS = (2 + (900000 / G_SIZE)); - int NUM_OVERSHOOT_BYTES = 20; + public static final int BASE_BLOCK_SIZE = 100000; + public static final int MAX_ALPHA_SIZE = 258; + public static final int MAX_CODE_LEN = 23; + public static final int RUNA = 0; + public static final int RUNB = 1; + public static final int N_GROUPS = 6; + public static final int G_SIZE = 50; + public static final int N_ITERS = 4; + public static final int MAX_SELECTORS = (2 + (900000 / G_SIZE)); + public static final int NUM_OVERSHOOT_BYTES = 20; - int[] RAND_NUMS = new int[] + public static final int[] RAND_NUMS = new int[] { 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, @@ -97,4 +97,12 @@ interface BZip2Constants 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, 936, 638 }; + + /** + * Prevent instantiation. + */ + private BZip2Constants() + { + } + } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2InputStream.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2InputStream.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2InputStream.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2InputStream.java Mon Nov 15 01:25:02 2010 @@ -19,6 +19,8 @@ package org.apache.commons.vfs2.provider import java.io.IOException; import java.io.InputStream; +import static org.apache.commons.vfs2.provider.bzip2.BZip2Constants.*; + /* * This package is based on the work done by Keiron Liddle, Aftex Software * <kei...@aftexsw.com> to whom the Ant project is very grateful for his @@ -31,9 +33,7 @@ import java.io.InputStream; * * @author <a href="mailto:kei...@aftexsw.com">Keiron Liddle</a> */ -class CBZip2InputStream - extends InputStream - implements BZip2Constants +class CBZip2InputStream extends InputStream { private static final int START_BLOCK_STATE = 1; private static final int RAND_PART_A_STATE = 2; @@ -76,7 +76,7 @@ class CBZip2InputStream private int j2; private char z; - private boolean m_blockRandomised; + private boolean blockRandomised; /* * always: in the range 0 .. 9. @@ -86,7 +86,7 @@ class CBZip2InputStream private int bsBuff; private int bsLive; - private InputStream m_input; + private InputStream inputStream; private int computedBlockCRC; private int computedCombinedCRC; @@ -245,7 +245,7 @@ class CBZip2InputStream /* * not a char and not EOF */ - if (m_blockRandomised) + if (blockRandomised) { rNToGo = 0; rTPos = 0; @@ -417,7 +417,7 @@ class CBZip2InputStream origPtr = readVariableSizedInt(24); recvDecodingTables(); - int EOB = nInUse + 1; + int eob = nInUse + 1; int groupNo = -1; int groupPos = 0; @@ -458,7 +458,7 @@ class CBZip2InputStream int zzi = 0; try { - zzi = m_input.read(); + zzi = inputStream.read(); } catch (IOException e) { @@ -481,7 +481,7 @@ class CBZip2InputStream while (true) { - if (nextSym == EOB) + if (nextSym == eob) { break; } @@ -490,18 +490,18 @@ class CBZip2InputStream { char ch; int s = -1; - int N = 1; + int n = 1; do { if (nextSym == RUNA) { - s = s + (0 + 1) * N; + s = s + (0 + 1) * n; } else // if( nextSym == RUNB ) { - s = s + (1 + 1) * N; + s = s + (1 + 1) * n; } - N = N * 2; + n = n * 2; if (groupPos == 0) { @@ -521,7 +521,7 @@ class CBZip2InputStream int zzi = 0; try { - zzi = m_input.read(); + zzi = inputStream.read(); } catch (IOException e) { @@ -613,7 +613,7 @@ class CBZip2InputStream char ch = 0; try { - ch = (char) m_input.read(); + ch = (char) inputStream.read(); } catch (IOException e) { @@ -638,18 +638,18 @@ class CBZip2InputStream private void bsFinishedWithStream() { - if (m_input != null) + if (inputStream != null) { try { - m_input.close(); + inputStream.close(); } catch (IOException e) { // Ignore the exception. } } - m_input = null; + inputStream = null; } private int readVariableSizedInt(final int numBits) @@ -679,7 +679,7 @@ class CBZip2InputStream int ch = 0; try { - ch = m_input.read(); + ch = inputStream.read(); } catch (final IOException ioe) { @@ -702,7 +702,7 @@ class CBZip2InputStream private void bsSetStream(final InputStream input) { - m_input = input; + inputStream = input; bsLive = 0; bsBuff = 0; } @@ -817,11 +817,11 @@ class CBZip2InputStream if (bsR(1) == 1) { - m_blockRandomised = true; + blockRandomised = true; } else { - m_blockRandomised = false; + blockRandomised = false; } // currBlockNo++; Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2OutputStream.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2OutputStream.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2OutputStream.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CBZip2OutputStream.java Mon Nov 15 01:25:02 2010 @@ -19,6 +19,8 @@ package org.apache.commons.vfs2.provider import java.io.IOException; import java.io.OutputStream; +import static org.apache.commons.vfs2.provider.bzip2.BZip2Constants.*; + /* * This package is based on the work done by Keiron Liddle, Aftex Software * <kei...@aftexsw.com> to whom the Ant project is very grateful for his @@ -31,9 +33,7 @@ import java.io.OutputStream; * * @author <a href="mailto:kei...@aftexsw.com">Keiron Liddle</a> */ -class CBZip2OutputStream - extends OutputStream - implements BZip2Constants +class CBZip2OutputStream extends OutputStream { private static final int LOWER_BYTE_MASK = 0x000000ff; private static final int UPPER_BYTE_MASK = 0xffffff00; @@ -817,12 +817,12 @@ class CBZip2OutputStream char tmp2; int zPend; int wr; - int EOB; + int eob; makeMaps(); - EOB = nInUse + 1; + eob = nInUse + 1; - for (i = 0; i <= EOB; i++) + for (i = 0; i <= eob; i++) { mtfFreq[i] = 0; } @@ -918,9 +918,9 @@ class CBZip2OutputStream } } - szptr[wr] = (short) EOB; + szptr[wr] = (short) eob; wr++; - mtfFreq[EOB]++; + mtfFreq[eob]++; nMTF = wr; } @@ -1272,9 +1272,9 @@ class CBZip2OutputStream sp = 0; - stack[sp].m_ll = loSt; - stack[sp].m_hh = hiSt; - stack[sp].m_dd = dSt; + stack[sp].ll = loSt; + stack[sp].hh = hiSt; + stack[sp].dd = dSt; sp++; while (sp > 0) @@ -1285,9 +1285,9 @@ class CBZip2OutputStream } sp--; - lo = stack[sp].m_ll; - hi = stack[sp].m_hh; - d = stack[sp].m_dd; + lo = stack[sp].ll; + hi = stack[sp].hh; + d = stack[sp].dd; if (hi - lo < SMALL_THRESH || d > DEPTH_THRESH) { @@ -1372,9 +1372,9 @@ class CBZip2OutputStream if (gtHi < ltLo) { - stack[sp].m_ll = lo; - stack[sp].m_hh = hi; - stack[sp].m_dd = d + 1; + stack[sp].ll = lo; + stack[sp].hh = hi; + stack[sp].dd = d + 1; sp++; continue; } @@ -1387,19 +1387,19 @@ class CBZip2OutputStream n = lo + unLo - ltLo - 1; m = hi - (gtHi - unHi) + 1; - stack[sp].m_ll = lo; - stack[sp].m_hh = n; - stack[sp].m_dd = d; + stack[sp].ll = lo; + stack[sp].hh = n; + stack[sp].dd = d; sp++; - stack[sp].m_ll = n + 1; - stack[sp].m_hh = m - 1; - stack[sp].m_dd = d + 1; + stack[sp].ll = n + 1; + stack[sp].hh = m - 1; + stack[sp].dd = d + 1; sp++; - stack[sp].m_ll = m; - stack[sp].m_hh = hi; - stack[sp].m_dd = d; + stack[sp].ll = m; + stack[sp].hh = hi; + stack[sp].dd = d; sp++; } } @@ -2031,11 +2031,14 @@ class CBZip2OutputStream } } + /** + * A Stack element + */ private static class StackElem { - int m_dd; - int m_hh; - int m_ll; + int dd; + int hh; + int ll; } } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CRC.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CRC.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CRC.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/CRC.java Mon Nov 15 01:25:02 2010 @@ -30,7 +30,7 @@ package org.apache.commons.vfs2.provider */ class CRC { - private static int[] CRC32_TABLE = new int[] + private static final int[] CRC32_TABLE = new int[] { 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, @@ -98,7 +98,7 @@ class CRC 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 }; - private int m_globalCrc; + private int globalCrc; protected CRC() { @@ -107,22 +107,22 @@ class CRC int getFinalCRC() { - return ~m_globalCrc; + return ~globalCrc; } void initialiseCRC() { - m_globalCrc = 0xffffffff; + globalCrc = 0xffffffff; } void updateCRC(final int inCh) { - int temp = (m_globalCrc >> 24) ^ inCh; + int temp = (globalCrc >> 24) ^ inCh; if (temp < 0) { temp = 256 + temp; } - m_globalCrc = (m_globalCrc << 8) ^ CRC32_TABLE[temp]; + globalCrc = (globalCrc << 8) ^ CRC32_TABLE[temp]; } } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java Mon Nov 15 01:25:02 2010 @@ -28,12 +28,12 @@ import org.apache.commons.vfs2.util.User import java.io.IOException; /** - * Create a FtpClient instance + * Create a FtpClient instance. * * @author <a href="mailto:ima...@apache.org">Mario Ivankovits</a> * @version $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $ */ -public class FtpsClientFactory +public final class FtpsClientFactory { private FtpsClientFactory() { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientWrapper.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientWrapper.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientWrapper.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientWrapper.java Mon Nov 15 01:25:02 2010 @@ -35,6 +35,7 @@ import org.apache.commons.vfs2.provider. /** * A wrapper to the FTPClient to allow automatic reconnect on connection loss.<br /> * I decided to not to use eg. noop() to determine the state of the connection to avoid unnecesary server round-trips. + * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a> */ class FtpsClientWrapper implements FtpClient { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java Mon Nov 15 01:25:02 2010 @@ -23,12 +23,12 @@ import org.apache.commons.vfs2.FileSyste import org.apache.commons.vfs2.provider.ftp.FtpFileSystem; /** - * The config BUILDER for various ftp configuration options + * The config BUILDER for various ftp configuration options. * * @author <a href="mailto:ima...@apache.org">Mario Ivankovits</a> * @version $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $ */ -public class FtpsFileSystemConfigBuilder extends FileSystemConfigBuilder +public final class FtpsFileSystemConfigBuilder extends FileSystemConfigBuilder { private static final FtpsFileSystemConfigBuilder BUILDER = new FtpsFileSystemConfigBuilder(); @@ -65,7 +65,7 @@ public class FtpsFileSystemConfigBuilder } /** - * FTPFileEntryParserFactory which will be used for ftp-entry parsing + * FTPFileEntryParserFactory which will be used for ftp-entry parsing. * * @param opts * @param factory instance of your factory @@ -87,7 +87,8 @@ public class FtpsFileSystemConfigBuilder /** * set the FQCN of your FileEntryParser used to parse the directory listing from your server.<br /> * <br /> - * <i>If you do not use the default commons-net FTPFileEntryParserFactory e.g. by using {...@link #setEntryParserFactory} + * <i>If you do not use the default commons-net FTPFileEntryParserFactory e.g. by using + * {...@link #setEntryParserFactory} * this is the "key" parameter passed as argument into your custom factory</i> * * @param opts @@ -114,7 +115,7 @@ public class FtpsFileSystemConfigBuilder } /** - * enter into passive mode + * Enter into passive mode. * * @param opts * @param passiveMode @@ -134,7 +135,7 @@ public class FtpsFileSystemConfigBuilder } /** - * use user directory as root (do not change to fs root) + * use user directory as root (do not change to fs root). * * @param opts * @param userDirIsRoot @@ -155,7 +156,7 @@ public class FtpsFileSystemConfigBuilder } /** - * Set FTPS security mode, either "implicit" or "explicit" + * Set FTPS security mode, either "implicit" or "explicit". * * @param opts * @param ftpsType Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java Mon Nov 15 01:25:02 2010 @@ -37,7 +37,7 @@ public class HttpFileSystemConfigBuilder private static final int DEFAULT_MAX_CONNECTIONS = 50; - private static final String OPTION_NAME__PREEMPTIVE_AUTHENTICATION = "preemptiveAuth"; + private static final String OPTION_NAME_PREEMPTIVE_AUTHENTICATION = "preemptiveAuth"; protected HttpFileSystemConfigBuilder(String prefix) { @@ -216,8 +216,8 @@ public class HttpFileSystemConfigBuilder */ public boolean isPreemptiveAuth(FileSystemOptions opts) { - return getBoolean(opts, OPTION_NAME__PREEMPTIVE_AUTHENTICATION, Boolean.FALSE).booleanValue(); - } + return getBoolean(opts, OPTION_NAME_PREEMPTIVE_AUTHENTICATION, Boolean.FALSE).booleanValue(); + } /** * Sets the given value for preemptive HTTP authentication (using BASIC) on the @@ -228,12 +228,12 @@ public class HttpFileSystemConfigBuilder * @param opts The FileSystemOptions. * @param preemptiveAuth the desired setting; true=enabled and false=disabled. */ - public void setPreemptiveAuth(FileSystemOptions opts, boolean preemptiveAuth) + public void setPreemptiveAuth(FileSystemOptions opts, boolean preemptiveAuth) { - setParam(opts, OPTION_NAME__PREEMPTIVE_AUTHENTICATION, Boolean.valueOf(preemptiveAuth)); - } + setParam(opts, OPTION_NAME_PREEMPTIVE_AUTHENTICATION, Boolean.valueOf(preemptiveAuth)); + } - @Override + @Override protected Class<? extends FileSystem> getConfigClass() { return HttpFileSystem.class; Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/ThreadLocalHttpConnectionManager.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/ThreadLocalHttpConnectionManager.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/ThreadLocalHttpConnectionManager.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/ThreadLocalHttpConnectionManager.java Mon Nov 15 01:25:02 2010 @@ -102,7 +102,7 @@ public class ThreadLocalHttpConnectionMa /** * A connection entry. */ - private static class Entry + private static final class Entry { /** * The http connection. Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarConstants.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarConstants.java?rev=1035116&r1=1035115&r2=1035116&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarConstants.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarConstants.java Mon Nov 15 01:25:02 2010 @@ -17,127 +17,134 @@ package org.apache.commons.vfs2.provider.tar; /** - * This interface contains all the definitions used in the package. + * This class contains all the definitions used in the package. * * @author <a href="mailto:t...@ice.com">Timothy Gerard Endres</a> * @author <a href="mailto:stef...@apache.org">Stefano Mazzocchi</a> * @version $Revision$ $Date$ */ -interface TarConstants +final class TarConstants { /** * The length of the mode field in a header buffer. */ - int MODELEN = 8; + public static final int MODELEN = 8; /** * The length of the user id field in a header buffer. */ - int UIDLEN = 8; + public static final int UIDLEN = 8; /** * The length of the group id field in a header buffer. */ - int GIDLEN = 8; + public static final int GIDLEN = 8; /** * The length of the checksum field in a header buffer. */ - int CHKSUMLEN = 8; + public static final int CHKSUMLEN = 8; /** * The length of the size field in a header buffer. */ - int SIZELEN = 12; + public static final int SIZELEN = 12; /** * The length of the magic field in a header buffer. */ - int MAGICLEN = 8; + public static final int MAGICLEN = 8; /** * The length of the modification time field in a header buffer. */ - int MODTIMELEN = 12; + public static final int MODTIMELEN = 12; /** * The length of the user name field in a header buffer. */ - int UNAMELEN = 32; + public static final int UNAMELEN = 32; /** * The length of the group name field in a header buffer. */ - int GNAMELEN = 32; + public static final int GNAMELEN = 32; /** * The length of the devices field in a header buffer. */ - int DEVLEN = 8; + public static final int DEVLEN = 8; /** * LF_ constants represent the "link flag" of an entry, or more commonly, * the "entry type". This is the "old way" of indicating a normal file. */ - byte LF_OLDNORM = 0; + public static final byte LF_OLDNORM = 0; /** * Normal file type. */ - byte LF_NORMAL = (byte) '0'; + public static final byte LF_NORMAL = (byte) '0'; /** * Link file type. */ - byte LF_LINK = (byte) '1'; + public static final byte LF_LINK = (byte) '1'; /** * Symbolic link file type. */ - byte LF_SYMLINK = (byte) '2'; + public static final byte LF_SYMLINK = (byte) '2'; /** * Character device file type. */ - byte LF_CHR = (byte) '3'; + public static final byte LF_CHR = (byte) '3'; /** * Block device file type. */ - byte LF_BLK = (byte) '4'; + public static final byte LF_BLK = (byte) '4'; /** * Directory file type. */ - byte LF_DIR = (byte) '5'; + public static final byte LF_DIR = (byte) '5'; /** * FIFO (pipe) file type. */ - byte LF_FIFO = (byte) '6'; + public static final byte LF_FIFO = (byte) '6'; /** * Contiguous file type. */ - byte LF_CONTIG = (byte) '7'; + public static final byte LF_CONTIG = (byte) '7'; /** * The magic tag representing a POSIX tar archive. */ - String TMAGIC = "ustar"; + public static final String TMAGIC = "ustar"; /** * The magic tag representing a GNU tar archive. */ - String GNU_TMAGIC = "ustar "; + public static final String GNU_TMAGIC = "ustar "; /** * The namr of the GNU tar entry which contains a long name. */ - String GNU_LONGLINK = "././@LongLink"; + public static final String GNU_LONGLINK = "././@LongLink"; /** * Identifies the *next* file on the tape as having a long name. */ - byte LF_GNUTYPE_LONGNAME = (byte) 'L'; + public static final byte LF_GNUTYPE_LONGNAME = (byte) 'L'; + + /** + * Prevent instantiation + */ + private TarConstants() + { + } }