Skip to content

Commit cb35a90

Browse files
committed
Reapply final modifier for static constants.
Removed unused imports. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@140471 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4f86f96 commit cb35a90

7 files changed

Lines changed: 38 additions & 54 deletions

File tree

src/test/org/apache/commons/io/CopyUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* @author Jeff Turner
7676
* @author Matthew Hawthorne
7777
* @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
78-
* @version $Id: CopyUtilsTest.java,v 1.4 2003/12/30 07:00:03 bayard Exp $
78+
* @version $Id: CopyUtilsTest.java,v 1.5 2003/12/30 15:26:59 jeremias Exp $
7979
* @see CopyUtils
8080
*/
8181
public class CopyUtilsTest extends FileBasedTestCase {
@@ -87,7 +87,7 @@ public class CopyUtilsTest extends FileBasedTestCase {
8787
* relevant methods are called. (JT)
8888
*/
8989

90-
private int FILE_SIZE = 1024 * 4 + 1;
90+
private static final int FILE_SIZE = 1024 * 4 + 1;
9191

9292

9393
private byte[] inData = generateTestData(FILE_SIZE);

src/test/org/apache/commons/io/DemuxTestCase.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/DemuxTestCase.java,v 1.8 2003/12/30 07:00:03 bayard Exp $
3-
* $Revision: 1.8 $
4-
* $Date: 2003/12/30 07:00:03 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/DemuxTestCase.java,v 1.9 2003/12/30 15:26:59 jeremias Exp $
3+
* $Revision: 1.9 $
4+
* $Date: 2003/12/30 15:26:59 $
55
*
66
* ====================================================================
77
*
@@ -82,15 +82,15 @@
8282
public class DemuxTestCase
8383
extends TestCase
8484
{
85-
private static String T1 = "Thread1";
86-
private static String T2 = "Thread2";
87-
private static String T3 = "Thread3";
88-
private static String T4 = "Thread4";
85+
private static final String T1 = "Thread1";
86+
private static final String T2 = "Thread2";
87+
private static final String T3 = "Thread3";
88+
private static final String T4 = "Thread4";
8989

90-
private static String DATA1 = "Data for thread1";
91-
private static String DATA2 = "Data for thread2";
92-
private static String DATA3 = "Data for thread3";
93-
private static String DATA4 = "Data for thread4";
90+
private static final String DATA1 = "Data for thread1";
91+
private static final String DATA2 = "Data for thread2";
92+
private static final String DATA3 = "Data for thread3";
93+
private static final String DATA4 = "Data for thread4";
9494

9595
private static Random c_random = new Random();
9696
private HashMap m_outputMap = new HashMap();

src/test/org/apache/commons/io/EndianUtilsTest.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/EndianUtilsTest.java,v 1.6 2003/11/27 06:30:26 bayard Exp $
3-
* $Revision: 1.6 $
4-
* $Date: 2003/11/27 06:30:26 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/EndianUtilsTest.java,v 1.7 2003/12/30 15:26:59 jeremias Exp $
3+
* $Revision: 1.7 $
4+
* $Date: 2003/12/30 15:26:59 $
55
*
66
* ====================================================================
77
*
88
* The Apache Software License, Version 1.1
99
*
10-
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
10+
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
1111
* reserved.
1212
*
1313
* Redistribution and use in source and binary forms, with or without
@@ -58,21 +58,14 @@
5858
* <http://www.apache.org/>.
5959
*
6060
*/
61-
62-
6361
package org.apache.commons.io;
6462

65-
66-
import java.io.IOException;
67-
6863
import junit.framework.TestCase;
6964

70-
7165
/**
7266
* @author Henri Yandell (bayard at apache dot org)
73-
* @version $Revision: 1.6 $ $Date: 2003/11/27 06:30:26 $
67+
* @version $Revision: 1.7 $ $Date: 2003/12/30 15:26:59 $
7468
*/
75-
7669
public class EndianUtilsTest extends TestCase {
7770

7871
public EndianUtilsTest(String name) {

src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java,v 1.3 2003/12/30 07:00:03 bayard Exp $
3-
* $Revision: 1.3 $
4-
* $Date: 2003/12/30 07:00:03 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java,v 1.4 2003/12/30 15:26:59 jeremias Exp $
3+
* $Revision: 1.4 $
4+
* $Date: 2003/12/30 15:26:59 $
55
*
66
* ====================================================================
77
*
@@ -73,8 +73,8 @@
7373
public class FileUtilsFileNewerTestCase extends FileBasedTestCase {
7474

7575
// Test data
76-
private static int FILE1_SIZE = 1;
77-
private static int FILE2_SIZE = 1024 * 4 + 1;
76+
private static final int FILE1_SIZE = 1;
77+
private static final int FILE2_SIZE = 1024 * 4 + 1;
7878

7979
private File m_testFile1;
8080
private File m_testFile2;
@@ -111,7 +111,7 @@ public void testIsFileNewer() {
111111
throw new IllegalStateException("The m_testFile1 should exist");
112112

113113
long fileLastModified = m_testFile1.lastModified();
114-
long ONE_SECOND = 1000;
114+
final long ONE_SECOND = 1000;
115115

116116
testIsFileNewer("one second earlier is not newer" , m_testFile1, fileLastModified + ONE_SECOND, false);
117117
testIsFileNewer("same time is not newer" , m_testFile1, fileLastModified, false);

src/test/org/apache/commons/io/FileUtilsTestCase.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v 1.9 2003/12/30 07:00:03 bayard Exp $
3-
* $Revision: 1.9 $
4-
* $Date: 2003/12/30 07:00:03 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v 1.10 2003/12/30 15:26:59 jeremias Exp $
3+
* $Revision: 1.10 $
4+
* $Date: 2003/12/30 15:26:59 $
55
*
66
* ====================================================================
77
*
@@ -75,7 +75,7 @@
7575
*
7676
* @author Peter Donald
7777
* @author Matthew Hawthorne
78-
* @version $Id: FileUtilsTestCase.java,v 1.9 2003/12/30 07:00:03 bayard Exp $
78+
* @version $Id: FileUtilsTestCase.java,v 1.10 2003/12/30 15:26:59 jeremias Exp $
7979
* @see FileUtils
8080
*/
8181
public class FileUtilsTestCase extends FileBasedTestCase {
@@ -85,7 +85,7 @@ public class FileUtilsTestCase extends FileBasedTestCase {
8585
/**
8686
* Size of test directory.
8787
*/
88-
private static int TEST_DIRECTORY_SIZE = 0;
88+
private static final int TEST_DIRECTORY_SIZE = 0;
8989

9090
private File testFile1;
9191
private File testFile2;

src/test/org/apache/commons/io/FilenameUtilsTestCase.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java,v 1.3 2003/12/30 07:00:03 bayard Exp $
3-
* $Revision: 1.3 $
4-
* $Date: 2003/12/30 07:00:03 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java,v 1.4 2003/12/30 15:26:59 jeremias Exp $
3+
* $Revision: 1.4 $
4+
* $Date: 2003/12/30 15:26:59 $
55
*
66
* ====================================================================
77
*
@@ -60,9 +60,7 @@
6060
package org.apache.commons.io;
6161

6262
import java.io.File;
63-
import java.io.FileInputStream;
6463
import java.io.IOException;
65-
import java.net.URL;
6664

6765
import org.apache.commons.io.testtools.FileBasedTestCase;
6866

@@ -75,18 +73,11 @@
7573
*
7674
* @author Peter Donald
7775
* @author Matthew Hawthorne
78-
* @version $Id: FilenameUtilsTestCase.java,v 1.3 2003/12/30 07:00:03 bayard Exp $
76+
* @version $Id: FilenameUtilsTestCase.java,v 1.4 2003/12/30 15:26:59 jeremias Exp $
7977
* @see FilenameUtils
8078
*/
8179
public class FilenameUtilsTestCase extends FileBasedTestCase {
8280

83-
// Test data
84-
85-
/**
86-
* Size of test directory.
87-
*/
88-
private static int TEST_DIRECTORY_SIZE = 0;
89-
9081
private File testFile1;
9182
private File testFile2;
9283

src/test/org/apache/commons/io/IOUtilsTestCase.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/IOUtilsTestCase.java,v 1.5 2003/12/30 07:06:46 bayard Exp $
3-
* $Revision: 1.5 $
4-
* $Date: 2003/12/30 07:06:46 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/IOUtilsTestCase.java,v 1.6 2003/12/30 15:26:59 jeremias Exp $
3+
* $Revision: 1.6 $
4+
* $Date: 2003/12/30 15:26:59 $
55
*
66
* ====================================================================
77
*
88
* The Apache Software License, Version 1.1
99
*
10-
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
10+
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
1111
* reserved.
1212
*
1313
* Redistribution and use in source and binary forms, with or without
@@ -95,7 +95,7 @@ public class IOUtilsTestCase extends FileBasedTestCase {
9595
* relevant methods are called. (JT)
9696
*/
9797

98-
private int FILE_SIZE = 1024 * 4 + 1;
98+
private static final int FILE_SIZE = 1024 * 4 + 1;
9999

100100
private File m_testFile;
101101

0 commit comments

Comments
 (0)