commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1411980 - /commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java
Date Wed, 21 Nov 2012 03:29:03 GMT
Author: ggregory
Date: Wed Nov 21 03:29:02 2012
New Revision: 1411980

URL: http://svn.apache.org/viewvc?rev=1411980&view=rev
Log:
Remove extra whitespace.

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=1411980&r1=1411979&r2=1411980&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 Wed Nov
21 03:29:02 2012
@@ -355,7 +355,6 @@ public class Tailer implements Runnable 
                 } catch (FileNotFoundException e) {
                     listener.fileNotFound();
                 }
-
                 if (reader == null) {
                     try {
                         Thread.sleep(delayMillis);
@@ -368,19 +367,13 @@ public class Tailer implements Runnable 
                     reader.seek(position);
                 }
             }
-
             while (getRun()) {
-
                 boolean newer = FileUtils.isFileNewer(file, last); // IO-279, must be done
first
-
                 // Check the file length to see if it was rotated
                 long length = file.length();
-
                 if (length < position) {
-
                     // File was rotated
                     listener.fileRotated();
-
                     // Reopen the reader after rotation
                     try {
                         // Ensure that the old file is closed iff we re-open it successfully
@@ -395,18 +388,13 @@ public class Tailer implements Runnable 
                     }
                     continue;
                 } else {
-
                     // File was not rotated
-
                     // See if the file needs to be read again
                     if (length > position) {
-
                         // The file has more content than it did last time
                         position = readLines(reader);
                         last = System.currentTimeMillis();
-
                     } else if (newer) {
-
                         /*
                          * This can happen if the file is truncated or overwritten with the
exact same length of
                          * information. In cases like this, the file position needs to be
reset
@@ -431,11 +419,8 @@ public class Tailer implements Runnable 
                     reader.seek(position);
                 }
             }
-
         } catch (Exception e) {
-
             listener.handle(e);
-
         } finally {
             IOUtils.closeQuietly(reader);
         }



Mime
View raw message