You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2003/12/30 07:55:59 UTC

cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output ByteArrayOutputStream.java DemuxOutputStream.java LockableFileWriter.java

bayard      2003/12/29 22:55:59

  Modified:    io/src/java/org/apache/commons/io/filefilter
                        AbstractFileFilter.java AndFileFilter.java
                        DirectoryFileFilter.java FalseFileFilter.java
                        NameFileFilter.java NotFileFilter.java
                        OrFileFilter.java PrefixFileFilter.java
                        SuffixFileFilter.java TrueFileFilter.java
               io/src/java/org/apache/commons/io/input
                        ClassLoaderObjectInputStream.java
                        DemuxInputStream.java SwappedDataInputStream.java
               io/src/java/org/apache/commons/io/output
                        ByteArrayOutputStream.java DemuxOutputStream.java
                        LockableFileWriter.java
  Log:
  removed lots of finals
  
  Revision  Changes    Path
  1.8       +3 -3      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/AbstractFileFilter.java
  
  Index: AbstractFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/AbstractFileFilter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractFileFilter.java	13 Oct 2003 07:03:50 -0000	1.7
  +++ AbstractFileFilter.java	30 Dec 2003 06:55:58 -0000	1.8
  @@ -76,7 +76,7 @@
        * @param file  the File to check
        * @return true if this file matches the test
        */
  -    public boolean accept(final File file) {
  +    public boolean accept(File file) {
           return accept(file.getParentFile(), file.getName());
       }
   
  @@ -87,7 +87,7 @@
        * @param name  the filename within the directory to check
        * @return true if this file matches the test
        */
  -    public boolean accept(final File dir, final String name) {
  +    public boolean accept(File dir, String name) {
           String filename = dir.getName() + File.separator + name;
           return accept(new File(filename));
       }
  
  
  
  1.7       +4 -4      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/AndFileFilter.java
  
  Index: AndFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/AndFileFilter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AndFileFilter.java	13 Oct 2003 07:03:50 -0000	1.6
  +++ AndFileFilter.java	30 Dec 2003 06:55:58 -0000	1.7
  @@ -66,9 +66,9 @@
   public class AndFileFilter extends AbstractFileFilter {
       
       /** The first filter */
  -    private final IOFileFilter filter1;
  +    private IOFileFilter filter1;
       /** The second filter */
  -    private final IOFileFilter filter2;
  +    private IOFileFilter filter2;
   
       /**
        * Constructs a new file filter that ANDs the result of two other filters.
  @@ -102,7 +102,7 @@
        * @param name  the filename
        * @return true if both filters are true
        */
  -    public boolean accept(final File file, final String name) {
  +    public boolean accept(File file, String name) {
           return filter1.accept(file, name) && filter2.accept(file, name);
       }
       
  
  
  
  1.5       +3 -3      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java
  
  Index: DirectoryFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DirectoryFileFilter.java	13 Oct 2003 07:03:50 -0000	1.4
  +++ DirectoryFileFilter.java	30 Dec 2003 06:55:58 -0000	1.5
  @@ -79,7 +79,7 @@
   public class DirectoryFileFilter extends AbstractFileFilter {
       
       /** Singleton instance of directory filter */
  -    public static final IOFileFilter INSTANCE = new DirectoryFileFilter();
  +    public static IOFileFilter INSTANCE = new DirectoryFileFilter();
       
       /**
        * Restrictive consructor.
  @@ -93,7 +93,7 @@
        * @param file  the File to check
        * @return true if the file is a directory
        */
  -    public boolean accept(final File file) {
  +    public boolean accept(File file) {
           return file.isDirectory();
       }
       
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/FalseFileFilter.java
  
  Index: FalseFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/FalseFileFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FalseFileFilter.java	13 Oct 2003 07:03:50 -0000	1.4
  +++ FalseFileFilter.java	30 Dec 2003 06:55:58 -0000	1.5
  @@ -67,7 +67,7 @@
   public class FalseFileFilter implements IOFileFilter {
       
       /** Singleton instance of false filter */
  -    public static final IOFileFilter INSTANCE = new FalseFileFilter();
  +    public static IOFileFilter INSTANCE = new FalseFileFilter();
       
       /**
        * Restrictive consructor.
  
  
  
  1.2       +6 -6      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/NameFileFilter.java
  
  Index: NameFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/NameFileFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NameFileFilter.java	22 Nov 2003 20:01:27 -0000	1.1
  +++ NameFileFilter.java	30 Dec 2003 06:55:58 -0000	1.2
  @@ -90,7 +90,7 @@
        * @param name  the name to allow, must not be null
        * @throws IllegalArgumentException if the prefix is null
        */
  -    public NameFileFilter(final String name) {
  +    public NameFileFilter(String name) {
           if (name == null) {
               throw new IllegalArgumentException("The name must not be null");
           }
  @@ -106,7 +106,7 @@
        * @param names  the names to allow, must not be null
        * @throws IllegalArgumentException if the names array is null
        */
  -    public NameFileFilter(final String[] names) {
  +    public NameFileFilter(String[] names) {
           if (names == null) {
               throw new IllegalArgumentException("The array of names must not be null");
           }
  @@ -120,7 +120,7 @@
        * @throws IllegalArgumentException if the name list is null
        * @throws ClassCastException if the list does not contain Strings
        */
  -    public NameFileFilter(final List names) {
  +    public NameFileFilter(List names) {
           if (names == null) {
               throw new IllegalArgumentException("The list of names must not be null");
           }
  @@ -133,7 +133,7 @@
        * @param file  the File to check
        * @return true if the filename matches
        */
  -    public boolean accept(final File file) {
  +    public boolean accept(File file) {
           String name = file.getName();
           for (int i = 0; i < this.names.length; i++) {
               if (name.equals(this.names[i])) {
  @@ -150,7 +150,7 @@
        * @param name  the filename
        * @return true if the filename matches
        */
  -    public boolean accept(final File file, final String name) {
  +    public boolean accept(File file, String name) {
           for (int i = 0; i < this.names.length; i++) {
               if (name.equals(this.names[i])) {
                   return true;
  
  
  
  1.5       +3 -3      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/NotFileFilter.java
  
  Index: NotFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/NotFileFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NotFileFilter.java	13 Oct 2003 07:03:50 -0000	1.4
  +++ NotFileFilter.java	30 Dec 2003 06:55:58 -0000	1.5
  @@ -66,7 +66,7 @@
   public class NotFileFilter extends AbstractFileFilter {
       
       /** The filter */
  -    private final IOFileFilter filter;
  +    private IOFileFilter filter;
   
       /**
        * Constructs a new file filter that NOTs the result of another filters.
  @@ -98,7 +98,7 @@
        * @param name  the filename
        * @return true if the filter returns false
        */
  -    public boolean accept(final File file, final String name) {
  +    public boolean accept(File file, String name) {
           return ! filter.accept(file, name);
       }
       
  
  
  
  1.7       +4 -4      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/OrFileFilter.java
  
  Index: OrFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/OrFileFilter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OrFileFilter.java	13 Oct 2003 07:03:50 -0000	1.6
  +++ OrFileFilter.java	30 Dec 2003 06:55:58 -0000	1.7
  @@ -66,9 +66,9 @@
   public class OrFileFilter extends AbstractFileFilter {
       
       /** The first filter */
  -    private final IOFileFilter filter1;
  +    private IOFileFilter filter1;
       /** The second filter */
  -    private final IOFileFilter filter2;
  +    private IOFileFilter filter2;
   
       /**
        * Constructs a new file filter that ORs the result of two other filters.
  @@ -102,7 +102,7 @@
        * @param name  the filename
        * @return true if either filter is true
        */
  -    public boolean accept(final File file, final String name) {
  +    public boolean accept(File file, String name) {
           return filter1.accept(file, name) || filter2.accept(file, name);
       }
       
  
  
  
  1.7       +6 -6      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/PrefixFileFilter.java
  
  Index: PrefixFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/PrefixFileFilter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PrefixFileFilter.java	22 Nov 2003 20:00:06 -0000	1.6
  +++ PrefixFileFilter.java	30 Dec 2003 06:55:58 -0000	1.7
  @@ -90,7 +90,7 @@
        * @param prefix  the prefix to allow, must not be null
        * @throws IllegalArgumentException if the prefix is null
        */
  -    public PrefixFileFilter(final String prefix) {
  +    public PrefixFileFilter(String prefix) {
           if (prefix == null) {
               throw new IllegalArgumentException("The prefix must not be null");
           }
  @@ -106,7 +106,7 @@
        * @param prefixes  the prefixes to allow, must not be null
        * @throws IllegalArgumentException if the prefix array is null
        */
  -    public PrefixFileFilter(final String[] prefixes) {
  +    public PrefixFileFilter(String[] prefixes) {
           if (prefixes == null) {
               throw new IllegalArgumentException("The array of prefixes must not be null");
           }
  @@ -120,7 +120,7 @@
        * @throws IllegalArgumentException if the prefix list is null
        * @throws ClassCastException if the list does not contain Strings
        */
  -    public PrefixFileFilter(final List prefixes) {
  +    public PrefixFileFilter(List prefixes) {
           if (prefixes == null) {
               throw new IllegalArgumentException("The list of prefixes must not be null");
           }
  @@ -133,7 +133,7 @@
        * @param file  the File to check
        * @return true if the filename starts with one of our prefixes
        */
  -    public boolean accept(final File file) {
  +    public boolean accept(File file) {
           String name = file.getName();
           for (int i = 0; i < this.prefixes.length; i++) {
               if (name.startsWith(this.prefixes[i])) {
  @@ -150,7 +150,7 @@
        * @param name  the filename
        * @return true if the filename starts with one of our prefixes
        */
  -    public boolean accept(final File file, final String name) {
  +    public boolean accept(File file, String name) {
           for (int i = 0; i < prefixes.length; i++) {
               if (name.startsWith(prefixes[i])) {
                   return true;
  
  
  
  1.5       +7 -7      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/SuffixFileFilter.java
  
  Index: SuffixFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/SuffixFileFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SuffixFileFilter.java	13 Oct 2003 07:03:50 -0000	1.4
  +++ SuffixFileFilter.java	30 Dec 2003 06:55:58 -0000	1.5
  @@ -83,7 +83,7 @@
   public class SuffixFileFilter extends AbstractFileFilter {
       
       /** The filename suffixes to search for */
  -    private final String[] suffixes;
  +    private String[] suffixes;
   
       /**
        * Constructs a new Suffix file filter for a single extension.
  @@ -91,7 +91,7 @@
        * @param suffix  the suffix to allow, must not be null
        * @throws IllegalArgumentException if the suffix is null
        */
  -    public SuffixFileFilter(final String suffix) {
  +    public SuffixFileFilter(String suffix) {
           if (suffix == null) {
               throw new IllegalArgumentException("The suffix must not be null");
           }
  @@ -107,7 +107,7 @@
        * @param suffixes  the suffixes to allow, must not be null
        * @throws IllegalArgumentException if the suffix array is null
        */
  -    public SuffixFileFilter(final String[] suffixes) {
  +    public SuffixFileFilter(String[] suffixes) {
           if (suffixes == null) {
               throw new IllegalArgumentException("The array of suffixes must not be null");
           }
  @@ -121,7 +121,7 @@
        * @throws IllegalArgumentException if the suffix list is null
        * @throws ClassCastException if the list does not contain Strings
        */
  -    public SuffixFileFilter(final List suffixes) {
  +    public SuffixFileFilter(List suffixes) {
           if (suffixes == null) {
               throw new IllegalArgumentException("The list of suffixes must not be null");
           }
  @@ -134,7 +134,7 @@
        * @param file  the File to check
        * @return true if the filename ends with one of our suffixes
        */
  -    public boolean accept(final File file) {
  +    public boolean accept(File file) {
           String name = file.getName();
           for (int i = 0; i < this.suffixes.length; i++) {
               if (name.endsWith(this.suffixes[i])) {
  @@ -151,7 +151,7 @@
        * @param name  the filename
        * @return true if the filename ends with one of our suffixes
        */
  -    public boolean accept(final File file, final String name) {
  +    public boolean accept(File file, String name) {
           for (int i = 0; i < this.suffixes.length; i++) {
               if (name.endsWith(this.suffixes[i])) {
                   return true;
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/TrueFileFilter.java
  
  Index: TrueFileFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/filefilter/TrueFileFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TrueFileFilter.java	13 Oct 2003 07:03:50 -0000	1.4
  +++ TrueFileFilter.java	30 Dec 2003 06:55:58 -0000	1.5
  @@ -67,7 +67,7 @@
   public class TrueFileFilter implements IOFileFilter {
       
       /** Singleton instance of true filter */
  -    public static final IOFileFilter INSTANCE = new TrueFileFilter();
  +    public static IOFileFilter INSTANCE = new TrueFileFilter();
       
       /**
        * Restrictive consructor.
  
  
  
  1.4       +5 -5      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
  
  Index: ClassLoaderObjectInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassLoaderObjectInputStream.java	13 Oct 2003 07:04:16 -0000	1.3
  +++ ClassLoaderObjectInputStream.java	30 Dec 2003 06:55:59 -0000	1.4
  @@ -78,8 +78,8 @@
        * @throws IOException in case of an I/O error
        * @throws StreamCorruptedException if the stream is corrupted
        */
  -    public ClassLoaderObjectInputStream( final ClassLoader classLoader,
  -                                         final InputStream inputStream )
  +    public ClassLoaderObjectInputStream( ClassLoader classLoader,
  +                                         InputStream inputStream )
           throws IOException, StreamCorruptedException
       {
           super( inputStream );
  @@ -87,10 +87,10 @@
       }
   
       /** @see java.io.ObjectInputStream#resolveClass(java.io.ObjectStreamClass) */
  -    protected Class resolveClass( final ObjectStreamClass objectStreamClass )
  +    protected Class resolveClass( ObjectStreamClass objectStreamClass )
           throws IOException, ClassNotFoundException
       {
  -        final Class clazz =
  +        Class clazz =
               Class.forName( objectStreamClass.getName(), false, m_classLoader );
   
           if( null != clazz )
  
  
  
  1.4       +7 -7      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/input/DemuxInputStream.java
  
  Index: DemuxInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/input/DemuxInputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DemuxInputStream.java	13 Oct 2003 07:04:16 -0000	1.3
  +++ DemuxInputStream.java	30 Dec 2003 06:55:59 -0000	1.4
  @@ -63,10 +63,10 @@
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
    */
  -public final class DemuxInputStream
  +public class DemuxInputStream
       extends InputStream
   {
  -    private final InheritableThreadLocal m_streams = new InheritableThreadLocal();
  +    private InheritableThreadLocal m_streams = new InheritableThreadLocal();
   
       /**
        * Bind the specified stream to the current thread.
  @@ -74,9 +74,9 @@
        * @param input the stream to bind
        * @return the InputStream that was previously active
        */
  -    public InputStream bindStream( final InputStream input )
  +    public InputStream bindStream( InputStream input )
       {
  -        final InputStream oldValue = getStream();
  +        InputStream oldValue = getStream();
           m_streams.set( input );
           return oldValue;
       }
  @@ -89,7 +89,7 @@
       public void close()
           throws IOException
       {
  -        final InputStream input = getStream();
  +        InputStream input = getStream();
           if( null != input )
           {
               input.close();
  @@ -105,7 +105,7 @@
       public int read()
           throws IOException
       {
  -        final InputStream input = getStream();
  +        InputStream input = getStream();
           if( null != input )
           {
               return input.read();
  
  
  
  1.5       +7 -7      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/input/SwappedDataInputStream.java
  
  Index: SwappedDataInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/input/SwappedDataInputStream.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SwappedDataInputStream.java	13 Oct 2003 07:04:16 -0000	1.4
  +++ SwappedDataInputStream.java	30 Dec 2003 06:55:59 -0000	1.5
  @@ -76,7 +76,7 @@
        * Constructs a SwappedDataInputStream.
        * @param input InputStream to read from
        */
  -    public SwappedDataInputStream( final InputStream input )
  +    public SwappedDataInputStream( InputStream input )
       {
           super( input );
       }
  @@ -117,22 +117,22 @@
       }
   
       /** @see java.io.DataInput#readFully(byte[]) */
  -    public void readFully( final byte[] data )
  +    public void readFully( byte[] data )
           throws IOException, EOFException
       {
           readFully( data, 0, data.length );
       }
   
       /** @see java.io.DataInput#readFully(byte[], int, int) */
  -    public void readFully( final byte[] data, final int offset, final int length )
  +    public void readFully( byte[] data, final int offset, final int length )
           throws IOException, EOFException
       {
           int remaining = length;
   
           while( remaining > 0 )
           {
  -            final int location = offset + ( length - remaining );
  -            final int count = read( data, location, remaining );
  +            int location = offset + ( length - remaining );
  +            int count = read( data, location, remaining );
   
               if( -1 == count )
               {
  @@ -195,7 +195,7 @@
       }
   
       /** @see java.io.DataInput#skipBytes(int) */
  -    public int skipBytes( final int count )
  +    public int skipBytes( int count )
           throws IOException, EOFException
       {
           return (int)in.skip( count );
  
  
  
  1.4       +11 -11    jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java
  
  Index: ByteArrayOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ByteArrayOutputStream.java	13 Oct 2003 07:04:31 -0000	1.3
  +++ ByteArrayOutputStream.java	30 Dec 2003 06:55:59 -0000	1.4
  @@ -91,7 +91,7 @@
    */
   public class ByteArrayOutputStream extends OutputStream {
   
  -    private static final boolean DEBUG = false;
  +    private static boolean DEBUG = false;
   
       private List buffers = new java.util.ArrayList();
       private int currentBufferIndex;
  @@ -143,7 +143,7 @@
               if (DEBUG) System.out.println("-->Recycling old buffer: size=" 
                           + currentBuffer.length);
           } else {
  -            final int newBufferSize;
  +            int newBufferSize;
               if (currentBuffer == null) {
                   newBufferSize = newcount;
                   filledBufferSum = 0;
  @@ -234,8 +234,8 @@
       public synchronized void writeTo(OutputStream out) throws IOException {
           int remaining = count;
           for (int i = 0; i < buffers.size(); i++) {
  -            final byte[] buf = getBuffer(i);
  -            final int c = Math.min(buf.length, remaining);
  +            byte[] buf = getBuffer(i);
  +            int c = Math.min(buf.length, remaining);
               out.write(buf, 0, c);
               remaining -= c;
               if (remaining == 0) {
  @@ -250,10 +250,10 @@
       public synchronized byte toByteArray()[] {
           int remaining = count;
           int pos = 0;
  -        final byte newbuf[] = new byte[count];
  +        byte newbuf[] = new byte[count];
           for (int i = 0; i < buffers.size(); i++) {
  -            final byte[] buf = getBuffer(i);
  -            final int c = Math.min(buf.length, remaining);
  +            byte[] buf = getBuffer(i);
  +            int c = Math.min(buf.length, remaining);
               System.arraycopy(buf, 0, newbuf, pos, c);
               pos += c;
               remaining -= c;
  
  
  
  1.4       +9 -9      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/DemuxOutputStream.java
  
  Index: DemuxOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/DemuxOutputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DemuxOutputStream.java	13 Oct 2003 07:04:31 -0000	1.3
  +++ DemuxOutputStream.java	30 Dec 2003 06:55:59 -0000	1.4
  @@ -63,10 +63,10 @@
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
    */
  -public final class DemuxOutputStream
  +public class DemuxOutputStream
       extends OutputStream
   {
  -    private final InheritableThreadLocal m_streams = new InheritableThreadLocal();
  +    private InheritableThreadLocal m_streams = new InheritableThreadLocal();
   
       /**
        * Bind the specified stream to the current thread.
  @@ -74,9 +74,9 @@
        * @param output the stream to bind
        * @return the OutputStream that was previously active
        */
  -    public OutputStream bindStream( final OutputStream output )
  +    public OutputStream bindStream( OutputStream output )
       {
  -        final OutputStream stream = getStream();
  +        OutputStream stream = getStream();
           m_streams.set( output );
           return stream;
       }
  @@ -89,7 +89,7 @@
       public void close()
           throws IOException
       {
  -        final OutputStream output = getStream();
  +        OutputStream output = getStream();
           if( null != output )
           {
               output.close();
  @@ -104,7 +104,7 @@
       public void flush()
           throws IOException
       {
  -        final OutputStream output = getStream();
  +        OutputStream output = getStream();
           if( null != output )
           {
               output.flush();
  @@ -117,10 +117,10 @@
        * @param ch the byte to write to stream
        * @throws IOException if an error occurs
        */
  -    public void write( final int ch )
  +    public void write( int ch )
           throws IOException
       {
  -        final OutputStream output = getStream();
  +        OutputStream output = getStream();
           if( null != output )
           {
               output.write( ch );
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/LockableFileWriter.java
  
  Index: LockableFileWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/LockableFileWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LockableFileWriter.java	27 Nov 2003 20:50:03 -0000	1.4
  +++ LockableFileWriter.java	30 Dec 2003 06:55:59 -0000	1.5
  @@ -73,7 +73,7 @@
    */
   public class LockableFileWriter extends Writer {
   
  -    private static final String LCK = ".lck";
  +    private static String LCK = ".lck";
   
       private File lockFile = null;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output ByteArrayOutputStream.java DemuxOutputStream.java LockableFileWriter.java

Posted by Jeremias Maerki <de...@greenmail.ch>.
Ah, re-read your mail stating:

> All finals should be gone from the code now. At least the bad ones. I've
> left final on classes for the moment, and final on a static variable is a
> good thing.

...so I guess this was an oversight. I'll revert as necessary.

On 30.12.2003 11:26:35 Jeremias Maerki wrote:
> Henri, why did you remove the finals from some constants? IMO that's not
> the same as removing the finals from method parameters, especially when
> the constants in question are public. I'd rather we leave the finals
> there.
> 
> On 30.12.2003 07:55:59 bayard wrote:
> >    public class DirectoryFileFilter extends AbstractFileFilter {
> >        
> >        /** Singleton instance of directory filter */
> >   -    public static final IOFileFilter INSTANCE = new DirectoryFileFilter();
> >   +    public static IOFileFilter INSTANCE = new DirectoryFileFilter();


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output ByteArrayOutputStream.java DemuxOutputStream.java LockableFileWriter.java

Posted by Jeremias Maerki <de...@greenmail.ch>.
Henri, why did you remove the finals from some constants? IMO that's not
the same as removing the finals from method parameters, especially when
the constants in question are public. I'd rather we leave the finals
there.

On 30.12.2003 07:55:59 bayard wrote:
>    public class DirectoryFileFilter extends AbstractFileFilter {
>        
>        /** Singleton instance of directory filter */
>   -    public static final IOFileFilter INSTANCE = new DirectoryFileFilter();
>   +    public static IOFileFilter INSTANCE = new DirectoryFileFilter();



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org