commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io FilenameUtilsTestCase.java FileUtilsTestCase.java EndianUtilsTest.java DemuxTestCase.java CopyUtilsTest.java IOUtilsTestCase.java FileUtilsFileNewerTestCase.java
Date Tue, 30 Dec 2003 15:26:59 GMT
jeremias    2003/12/30 07:26:59

  Modified:    io/src/test/org/apache/commons/io FilenameUtilsTestCase.java
                        FileUtilsTestCase.java EndianUtilsTest.java
                        DemuxTestCase.java CopyUtilsTest.java
                        IOUtilsTestCase.java
                        FileUtilsFileNewerTestCase.java
  Log:
  Reapply final modifier for static constants.
  Removed unused imports.
  
  Revision  Changes    Path
  1.4       +4 -13     jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java
  
  Index: FilenameUtilsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FilenameUtilsTestCase.java	30 Dec 2003 07:00:03 -0000	1.3
  +++ FilenameUtilsTestCase.java	30 Dec 2003 15:26:59 -0000	1.4
  @@ -60,9 +60,7 @@
   package org.apache.commons.io;
   
   import java.io.File;
  -import java.io.FileInputStream;
   import java.io.IOException;
  -import java.net.URL;
   
   import org.apache.commons.io.testtools.FileBasedTestCase;
   
  @@ -79,13 +77,6 @@
    * @see FilenameUtils
    */
   public class FilenameUtilsTestCase extends FileBasedTestCase {
  -
  -    // Test data
  -
  -    /**
  -     * Size of test directory.
  -     */
  -    private static int TEST_DIRECTORY_SIZE = 0;
   
       private File testFile1;
       private File testFile2;
  
  
  
  1.10      +5 -5      jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsTestCase.java
  
  Index: FileUtilsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FileUtilsTestCase.java	30 Dec 2003 07:00:03 -0000	1.9
  +++ FileUtilsTestCase.java	30 Dec 2003 15:26:59 -0000	1.10
  @@ -85,7 +85,7 @@
       /**
        * Size of test directory.
        */
  -    private static int TEST_DIRECTORY_SIZE = 0;
  +    private static final int TEST_DIRECTORY_SIZE = 0;
   
       private File testFile1;
       private File testFile2;
  
  
  
  1.7       +5 -12     jakarta-commons-sandbox/io/src/test/org/apache/commons/io/EndianUtilsTest.java
  
  Index: EndianUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/EndianUtilsTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EndianUtilsTest.java	27 Nov 2003 06:30:26 -0000	1.6
  +++ EndianUtilsTest.java	30 Dec 2003 15:26:59 -0000	1.7
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -58,21 +58,14 @@
    * <http://www.apache.org/>.
    *
    */
  -
  -
   package org.apache.commons.io;
   
  -
  -import java.io.IOException;
  -
   import junit.framework.TestCase;
   
  -
   /**
    * @author Henri Yandell (bayard at apache dot org)
    * @version $Revision$ $Date$
    */
  -
   public class EndianUtilsTest extends TestCase {
   
       public EndianUtilsTest(String name) {
  
  
  
  1.9       +11 -11    jakarta-commons-sandbox/io/src/test/org/apache/commons/io/DemuxTestCase.java
  
  Index: DemuxTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/DemuxTestCase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DemuxTestCase.java	30 Dec 2003 07:00:03 -0000	1.8
  +++ DemuxTestCase.java	30 Dec 2003 15:26:59 -0000	1.9
  @@ -82,15 +82,15 @@
   public class DemuxTestCase
       extends TestCase
   {
  -    private static String T1 = "Thread1";
  -    private static String T2 = "Thread2";
  -    private static String T3 = "Thread3";
  -    private static String T4 = "Thread4";
  +    private static final String T1 = "Thread1";
  +    private static final String T2 = "Thread2";
  +    private static final String T3 = "Thread3";
  +    private static final String T4 = "Thread4";
   
  -    private static String DATA1 = "Data for thread1";
  -    private static String DATA2 = "Data for thread2";
  -    private static String DATA3 = "Data for thread3";
  -    private static String DATA4 = "Data for thread4";
  +    private static final String DATA1 = "Data for thread1";
  +    private static final String DATA2 = "Data for thread2";
  +    private static final String DATA3 = "Data for thread3";
  +    private static final String DATA4 = "Data for thread4";
   
       private static Random c_random = new Random();
       private HashMap m_outputMap = new HashMap();
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/io/src/test/org/apache/commons/io/CopyUtilsTest.java
  
  Index: CopyUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/CopyUtilsTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CopyUtilsTest.java	30 Dec 2003 07:00:03 -0000	1.4
  +++ CopyUtilsTest.java	30 Dec 2003 15:26:59 -0000	1.5
  @@ -87,7 +87,7 @@
        * relevant methods are called. (JT)
        */
   
  -    private int FILE_SIZE = 1024 * 4 + 1;
  +    private static final int FILE_SIZE = 1024 * 4 + 1;
   
   
       private byte[] inData = generateTestData(FILE_SIZE);
  
  
  
  1.6       +5 -5      jakarta-commons-sandbox/io/src/test/org/apache/commons/io/IOUtilsTestCase.java
  
  Index: IOUtilsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/IOUtilsTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IOUtilsTestCase.java	30 Dec 2003 07:06:46 -0000	1.5
  +++ IOUtilsTestCase.java	30 Dec 2003 15:26:59 -0000	1.6
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -95,7 +95,7 @@
        * relevant methods are called. (JT)
        */
   
  -    private int FILE_SIZE = 1024 * 4 + 1;
  +    private static final int FILE_SIZE = 1024 * 4 + 1;
   
       private File m_testFile;
   
  
  
  
  1.4       +6 -6      jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java
  
  Index: FileUtilsFileNewerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileUtilsFileNewerTestCase.java	30 Dec 2003 07:00:03 -0000	1.3
  +++ FileUtilsFileNewerTestCase.java	30 Dec 2003 15:26:59 -0000	1.4
  @@ -73,8 +73,8 @@
   public class FileUtilsFileNewerTestCase extends FileBasedTestCase {
   
       // Test data
  -    private static int FILE1_SIZE = 1;
  -    private static int FILE2_SIZE = 1024 * 4 + 1;
  +    private static final int FILE1_SIZE = 1;
  +    private static final int FILE2_SIZE = 1024 * 4 + 1;
   
       private File m_testFile1;
       private File m_testFile2;
  @@ -111,7 +111,7 @@
               throw new IllegalStateException("The m_testFile1 should exist");
   
           long fileLastModified = m_testFile1.lastModified();
  -        long ONE_SECOND = 1000;
  +        final long ONE_SECOND = 1000;
   
           testIsFileNewer("one second earlier is not newer" , m_testFile1, fileLastModified
+ ONE_SECOND, false);
           testIsFileNewer("same time is not newer" , m_testFile1, fileLastModified, false);
  
  
  

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


Mime
View raw message