commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1345281 - /commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java
Date Fri, 01 Jun 2012 17:32:38 GMT
Author: ggregory
Date: Fri Jun  1 17:32:38 2012
New Revision: 1345281

URL: http://svn.apache.org/viewvc?rev=1345281&view=rev
Log:
Use constant instead of magic number.

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java?rev=1345281&r1=1345280&r2=1345281&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java Fri Jun
 1 17:32:38 2012
@@ -106,6 +106,8 @@ import org.apache.commons.io.IOUtils;
  */
 public class Tailer implements Runnable {
 
+    private static final int DEFAULT_DELAY_MILLIS = 1000;
+
     private static final String RAF_MODE = "r";
 
     private static final int DEFAULT_BUFSIZE = 4096;
@@ -146,7 +148,7 @@ public class Tailer implements Runnable 
      * @param listener the TailerListener to use.
      */
     public Tailer(File file, TailerListener listener) {
-        this(file, listener, 1000);
+        this(file, listener, DEFAULT_DELAY_MILLIS);
     }
 
     /**
@@ -243,7 +245,7 @@ public class Tailer implements Runnable 
      * @return The new tailer
      */
     public static Tailer create(File file, TailerListener listener) {
-        return create(file, listener, 1000, false);
+        return create(file, listener, DEFAULT_DELAY_MILLIS, false);
     }
 
     /**



Mime
View raw message