Skip to content

Commit c77a476

Browse files
committed
removed lots of finals
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@140457 13f79535-47bb-0310-9956-ffa450edef68
1 parent d5e24a4 commit c77a476

17 files changed

Lines changed: 101 additions & 101 deletions

src/java/org/apache/commons/io/EndianUtils.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* Origin of code: Apache Avalon (Excalibur)
6565
*
6666
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
67-
* @version CVS $Revision: 1.8 $ $Date: 2003/12/30 06:50:16 $
67+
* @version CVS $Revision: 1.9 $ $Date: 2003/12/30 06:52:49 $
6868
*/
6969
public final class EndianUtils
7070
{
@@ -349,8 +349,8 @@ public static short readSwappedShort( InputStream input )
349349
public static int readSwappedUnsignedShort( InputStream input )
350350
throws IOException
351351
{
352-
final int value1 = read( input );
353-
final int value2 = read( input );
352+
int value1 = read( input );
353+
int value2 = read( input );
354354

355355
return (int)( ( ( value1 & 0xff ) << 0 ) +
356356
( ( value2 & 0xff ) << 8 ) );
@@ -382,10 +382,10 @@ public static void writeSwappedInteger( OutputStream output, int value )
382382
public static int readSwappedInteger( InputStream input )
383383
throws IOException
384384
{
385-
final int value1 = read( input );
386-
final int value2 = read( input );
387-
final int value3 = read( input );
388-
final int value4 = read( input );
385+
int value1 = read( input );
386+
int value2 = read( input );
387+
int value3 = read( input );
388+
int value4 = read( input );
389389

390390
return (int)( ( ( value1 & 0xff ) << 0 ) +
391391
( ( value2 & 0xff ) << 8 ) +
@@ -403,10 +403,10 @@ public static int readSwappedInteger( InputStream input )
403403
public static long readSwappedUnsignedInteger( InputStream input )
404404
throws IOException
405405
{
406-
final int value1 = read( input );
407-
final int value2 = read( input );
408-
final int value3 = read( input );
409-
final int value4 = read( input );
406+
int value1 = read( input );
407+
int value2 = read( input );
408+
int value3 = read( input );
409+
int value4 = read( input );
410410

411411
return (long)( ( ( value1 & 0xff ) << 0 ) +
412412
( ( value2 & 0xff ) << 8 ) +
@@ -444,14 +444,14 @@ public static void writeSwappedLong( OutputStream output, long value )
444444
public static long readSwappedLong( InputStream input )
445445
throws IOException
446446
{
447-
final int value1 = read( input );
448-
final int value2 = read( input );
449-
final int value3 = read( input );
450-
final int value4 = read( input );
451-
final int value5 = read( input );
452-
final int value6 = read( input );
453-
final int value7 = read( input );
454-
final int value8 = read( input );
447+
int value1 = read( input );
448+
int value2 = read( input );
449+
int value3 = read( input );
450+
int value4 = read( input );
451+
int value5 = read( input );
452+
int value6 = read( input );
453+
int value7 = read( input );
454+
int value8 = read( input );
455455

456456
return (long)( ( ( value1 & 0xff ) << 0 ) +
457457
( ( value2 & 0xff ) << 8 ) +
@@ -518,7 +518,7 @@ public static double readSwappedDouble( InputStream input )
518518
private static int read( InputStream input )
519519
throws IOException
520520
{
521-
final int value = input.read();
521+
int value = input.read();
522522

523523
if( -1 == value )
524524
{

src/java/org/apache/commons/io/filefilter/AbstractFileFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* otherwise your class will infinitely loop.
6464
*
6565
* @since Commons IO 1.0
66-
* @version $Revision: 1.7 $ $Date: 2003/10/13 07:03:50 $
66+
* @version $Revision: 1.8 $ $Date: 2003/12/30 06:55:58 $
6767
*
6868
* @author Henri Yandell
6969
* @author Stephen Colebourne
@@ -76,7 +76,7 @@ public abstract class AbstractFileFilter implements IOFileFilter {
7676
* @param file the File to check
7777
* @return true if this file matches the test
7878
*/
79-
public boolean accept(final File file) {
79+
public boolean accept(File file) {
8080
return accept(file.getParentFile(), file.getName());
8181
}
8282

@@ -87,7 +87,7 @@ public boolean accept(final File file) {
8787
* @param name the filename within the directory to check
8888
* @return true if this file matches the test
8989
*/
90-
public boolean accept(final File dir, final String name) {
90+
public boolean accept(File dir, String name) {
9191
String filename = dir.getName() + File.separator + name;
9292
return accept(new File(filename));
9393
}

src/java/org/apache/commons/io/filefilter/AndFileFilter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
* This filter produces a logical AND of the two filters specified.
6060
*
6161
* @since Commons IO 1.0
62-
* @version $Revision: 1.6 $ $Date: 2003/10/13 07:03:50 $
62+
* @version $Revision: 1.7 $ $Date: 2003/12/30 06:55:58 $
6363
*
6464
* @author Stephen Colebourne
6565
*/
6666
public class AndFileFilter extends AbstractFileFilter {
6767

6868
/** The first filter */
69-
private final IOFileFilter filter1;
69+
private IOFileFilter filter1;
7070
/** The second filter */
71-
private final IOFileFilter filter2;
71+
private IOFileFilter filter2;
7272

7373
/**
7474
* Constructs a new file filter that ANDs the result of two other filters.
@@ -102,7 +102,7 @@ public boolean accept(File file) {
102102
* @param name the filename
103103
* @return true if both filters are true
104104
*/
105-
public boolean accept(final File file, final String name) {
105+
public boolean accept(File file, String name) {
106106
return filter1.accept(file, name) && filter2.accept(file, name);
107107
}
108108

src/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
* </pre>
7171
*
7272
* @since Commons IO 1.0
73-
* @version $Revision: 1.4 $ $Date: 2003/10/13 07:03:50 $
73+
* @version $Revision: 1.5 $ $Date: 2003/12/30 06:55:58 $
7474
*
7575
* @author Henri Yandell
7676
* @author Stephen Colebourne
@@ -79,7 +79,7 @@
7979
public class DirectoryFileFilter extends AbstractFileFilter {
8080

8181
/** Singleton instance of directory filter */
82-
public static final IOFileFilter INSTANCE = new DirectoryFileFilter();
82+
public static IOFileFilter INSTANCE = new DirectoryFileFilter();
8383

8484
/**
8585
* Restrictive consructor.
@@ -93,7 +93,7 @@ protected DirectoryFileFilter() {
9393
* @param file the File to check
9494
* @return true if the file is a directory
9595
*/
96-
public boolean accept(final File file) {
96+
public boolean accept(File file) {
9797
return file.isDirectory();
9898
}
9999

src/java/org/apache/commons/io/filefilter/FalseFileFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
* A file filter that always returns false.
6060
*
6161
* @since Commons IO 1.0
62-
* @version $Revision: 1.4 $ $Date: 2003/10/13 07:03:50 $
62+
* @version $Revision: 1.5 $ $Date: 2003/12/30 06:55:58 $
6363
*
6464
* @author Henri Yandell
6565
* @author Stephen Colebourne
6666
*/
6767
public class FalseFileFilter implements IOFileFilter {
6868

6969
/** Singleton instance of false filter */
70-
public static final IOFileFilter INSTANCE = new FalseFileFilter();
70+
public static IOFileFilter INSTANCE = new FalseFileFilter();
7171

7272
/**
7373
* Restrictive consructor.

src/java/org/apache/commons/io/filefilter/NameFileFilter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
* </pre>
7272
*
7373
* @since Commons IO 1.0
74-
* @version $Revision: 1.1 $ $Date: 2003/11/22 20:01:27 $
74+
* @version $Revision: 1.2 $ $Date: 2003/12/30 06:55:58 $
7575
*
7676
* @author Henri Yandell
7777
* @author Stephen Colebourne
@@ -90,7 +90,7 @@ public class NameFileFilter extends AbstractFileFilter {
9090
* @param name the name to allow, must not be null
9191
* @throws IllegalArgumentException if the prefix is null
9292
*/
93-
public NameFileFilter(final String name) {
93+
public NameFileFilter(String name) {
9494
if (name == null) {
9595
throw new IllegalArgumentException("The name must not be null");
9696
}
@@ -106,7 +106,7 @@ public NameFileFilter(final String name) {
106106
* @param names the names to allow, must not be null
107107
* @throws IllegalArgumentException if the names array is null
108108
*/
109-
public NameFileFilter(final String[] names) {
109+
public NameFileFilter(String[] names) {
110110
if (names == null) {
111111
throw new IllegalArgumentException("The array of names must not be null");
112112
}
@@ -120,7 +120,7 @@ public NameFileFilter(final String[] names) {
120120
* @throws IllegalArgumentException if the name list is null
121121
* @throws ClassCastException if the list does not contain Strings
122122
*/
123-
public NameFileFilter(final List names) {
123+
public NameFileFilter(List names) {
124124
if (names == null) {
125125
throw new IllegalArgumentException("The list of names must not be null");
126126
}
@@ -133,7 +133,7 @@ public NameFileFilter(final List names) {
133133
* @param file the File to check
134134
* @return true if the filename matches
135135
*/
136-
public boolean accept(final File file) {
136+
public boolean accept(File file) {
137137
String name = file.getName();
138138
for (int i = 0; i < this.names.length; i++) {
139139
if (name.equals(this.names[i])) {
@@ -150,7 +150,7 @@ public boolean accept(final File file) {
150150
* @param name the filename
151151
* @return true if the filename matches
152152
*/
153-
public boolean accept(final File file, final String name) {
153+
public boolean accept(File file, String name) {
154154
for (int i = 0; i < this.names.length; i++) {
155155
if (name.equals(this.names[i])) {
156156
return true;

src/java/org/apache/commons/io/filefilter/NotFileFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@
5959
* This filter produces a logical NOT of the filters specified.
6060
*
6161
* @since Commons IO 1.0
62-
* @version $Revision: 1.4 $ $Date: 2003/10/13 07:03:50 $
62+
* @version $Revision: 1.5 $ $Date: 2003/12/30 06:55:58 $
6363
*
6464
* @author Stephen Colebourne
6565
*/
6666
public class NotFileFilter extends AbstractFileFilter {
6767

6868
/** The filter */
69-
private final IOFileFilter filter;
69+
private IOFileFilter filter;
7070

7171
/**
7272
* Constructs a new file filter that NOTs the result of another filters.
@@ -98,7 +98,7 @@ public boolean accept(File file) {
9898
* @param name the filename
9999
* @return true if the filter returns false
100100
*/
101-
public boolean accept(final File file, final String name) {
101+
public boolean accept(File file, String name) {
102102
return ! filter.accept(file, name);
103103
}
104104

src/java/org/apache/commons/io/filefilter/OrFileFilter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
* This filter produces a logical OR of the two filters specified.
6060
*
6161
* @since Commons IO 1.0
62-
* @version $Revision: 1.6 $ $Date: 2003/10/13 07:03:50 $
62+
* @version $Revision: 1.7 $ $Date: 2003/12/30 06:55:58 $
6363
*
6464
* @author Stephen Colebourne
6565
*/
6666
public class OrFileFilter extends AbstractFileFilter {
6767

6868
/** The first filter */
69-
private final IOFileFilter filter1;
69+
private IOFileFilter filter1;
7070
/** The second filter */
71-
private final IOFileFilter filter2;
71+
private IOFileFilter filter2;
7272

7373
/**
7474
* Constructs a new file filter that ORs the result of two other filters.
@@ -102,7 +102,7 @@ public boolean accept(File file) {
102102
* @param name the filename
103103
* @return true if either filter is true
104104
*/
105-
public boolean accept(final File file, final String name) {
105+
public boolean accept(File file, String name) {
106106
return filter1.accept(file, name) || filter2.accept(file, name);
107107
}
108108

src/java/org/apache/commons/io/filefilter/PrefixFileFilter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
* </pre>
7272
*
7373
* @since Commons IO 1.0
74-
* @version $Revision: 1.6 $ $Date: 2003/11/22 20:00:06 $
74+
* @version $Revision: 1.7 $ $Date: 2003/12/30 06:55:58 $
7575
*
7676
* @author Henri Yandell
7777
* @author Stephen Colebourne
@@ -90,7 +90,7 @@ public class PrefixFileFilter extends AbstractFileFilter {
9090
* @param prefix the prefix to allow, must not be null
9191
* @throws IllegalArgumentException if the prefix is null
9292
*/
93-
public PrefixFileFilter(final String prefix) {
93+
public PrefixFileFilter(String prefix) {
9494
if (prefix == null) {
9595
throw new IllegalArgumentException("The prefix must not be null");
9696
}
@@ -106,7 +106,7 @@ public PrefixFileFilter(final String prefix) {
106106
* @param prefixes the prefixes to allow, must not be null
107107
* @throws IllegalArgumentException if the prefix array is null
108108
*/
109-
public PrefixFileFilter(final String[] prefixes) {
109+
public PrefixFileFilter(String[] prefixes) {
110110
if (prefixes == null) {
111111
throw new IllegalArgumentException("The array of prefixes must not be null");
112112
}
@@ -120,7 +120,7 @@ public PrefixFileFilter(final String[] prefixes) {
120120
* @throws IllegalArgumentException if the prefix list is null
121121
* @throws ClassCastException if the list does not contain Strings
122122
*/
123-
public PrefixFileFilter(final List prefixes) {
123+
public PrefixFileFilter(List prefixes) {
124124
if (prefixes == null) {
125125
throw new IllegalArgumentException("The list of prefixes must not be null");
126126
}
@@ -133,7 +133,7 @@ public PrefixFileFilter(final List prefixes) {
133133
* @param file the File to check
134134
* @return true if the filename starts with one of our prefixes
135135
*/
136-
public boolean accept(final File file) {
136+
public boolean accept(File file) {
137137
String name = file.getName();
138138
for (int i = 0; i < this.prefixes.length; i++) {
139139
if (name.startsWith(this.prefixes[i])) {
@@ -150,7 +150,7 @@ public boolean accept(final File file) {
150150
* @param name the filename
151151
* @return true if the filename starts with one of our prefixes
152152
*/
153-
public boolean accept(final File file, final String name) {
153+
public boolean accept(File file, String name) {
154154
for (int i = 0; i < prefixes.length; i++) {
155155
if (name.startsWith(prefixes[i])) {
156156
return true;

0 commit comments

Comments
 (0)