Author: krosenvold
Date: Thu Nov 12 16:06:41 2015
New Revision: 1714076
URL: http://svn.apache.org/viewvc?rev=1714076&view=rev
Log:
Removed added method from interface that broke binary compatibility.
Clients wishing to use this feature must subclass TailerListenerAdapter until
we break compatibility or go java8 minumum.
Modified:
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.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=1714076&r1=1714075&r2=1714076&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
Thu Nov 12 16:06:41 2015
@@ -550,7 +550,9 @@ public class Tailer implements Runnable
IOUtils.closeQuietly(lineBuf); // not strictly necessary
reader.seek(rePos); // Ensure we can re-read if necessary
- listener.endOfFileReached();
+ if (listener instanceof TailerListenerAdapter) {
+ ((TailerListenerAdapter) listener).endOfFileReached();
+ }
return rePos;
}
Modified:
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java
URL:
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java?rev=1714076&r1=1714075&r2=1714076&view=diff
==============================================================================
---
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java
(original)
+++
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java
Thu Nov 12 16:06:41 2015
@@ -64,11 +64,4 @@ public interface TailerListener {
*/
void handle(Exception ex);
- /**
- * Called each time the Tailer reaches the end of the file.
- * <p>
- * <b>Note:</b> this is called from the tailer thread.
- * @since 2.5
- */
- void endOfFileReached();
}
Modified:
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
URL:
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java?rev=1714076&r1=1714075&r2=1714076&view=diff
==============================================================================
---
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
(original)
+++
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
Thu Nov 12 16:06:41 2015
@@ -63,6 +63,12 @@ public class TailerListenerAdapter imple
/**
* Called each time the Tailer reaches the end of the file.
+ *
+ * <b>Note:</b> this is called from the tailer thread.
+ *
+ * Note: a future version of commons-io will pull this method up to the
TailerListener interface,
+ * for now clients must subclass this class to use this feature.
+ *
* @since 2.5
*/
public void endOfFileReached() {