Comment empty block. Formatting.
MODIFY
src/main/java/org/apache/commons/io/input/DemuxInputStream.java
src/main/java/org/apache/commons/io/input/DemuxInputStream.java
import java.io.InputStream;
/**
- * Data written to this stream is forwarded to a stream that has been associated
- * with this thread.
+ * Data written to this stream is forwarded to a stream that has been associated with this thread.
*
*/
-public class DemuxInputStream
- extends InputStream
-{
+public class DemuxInputStream extends InputStream {
private final InheritableThreadLocal<InputStream> m_streams = new InheritableThreadLocal<>();
/**
* @param input the stream to bind
* @return the InputStream that was previously active
*/
- public InputStream bindStream( final InputStream input )
- {
+ public InputStream bindStream(final InputStream input) {
final InputStream oldValue = m_streams.get();
m_streams.set(input);
return oldValue;
@@ -50,12 +46,9 @@ public InputStream bindStream( final InputStream input )
* @throws IOException if an error occurs
*/
@Override
- public void close()
- throws IOException
- {
+ public void close() throws IOException {
final InputStream input = m_streams.get();
- if( null != input )
- {
+ if (null != input) {
input.close();
}
}
@@ -67,12 +60,9 @@ public void close()
* @throws IOException if an error occurs
*/
@Override
- public int read()
- throws IOException
- {
+ public int read() throws IOException {
final InputStream input = m_streams.get();
- if( null != input )
- {
+ if (null != input) {
return input.read();
}
return EOF;

MODIFY
src/main/java/org/apache/commons/io/input/ObservableInputStream.java
src/main/java/org/apache/commons/io/input/ObservableInputStream.java
* because, in that case, {@link #finished()} will be invoked instead.
* @throws IOException if an i/o-error occurs
*/
- public void data(final int pByte) throws IOException {}
+ public void data(final int pByte) throws IOException {
+ // noop
+ }
/** Called to indicate, that {@link InputStream#read(byte[])}, or
* {@link InputStream#read(byte[], int, int)} have been called, and are about to
@@ -55,7 +57,9 @@ public void data(final int pByte) throws IOException {}
* @param pLength The number of bytes, which have been stored in the byte array.
* @throws IOException if an i/o-error occurs
*/
- public void data(final byte[] pBuffer, final int pOffset, final int pLength) throws IOException {}
+ public void data(final byte[] pBuffer, final int pOffset, final int pLength) throws IOException {
+ // noop
+ }
/** Called to indicate, that EOF has been seen on the underlying stream.
* This method may be called multiple times, if the reader keeps invoking
@@ -63,12 +67,16 @@ public void data(final byte[] pBuffer, final int pOffset, final int pLength) thr
* EOF.
* @throws IOException if an i/o-error occurs
*/
- public void finished() throws IOException {}
+ public void finished() throws IOException {
+ // noop
+ }
/** Called to indicate, that the {@link ObservableInputStream} has been closed.
* @throws IOException if an i/o-error occurs
*/
- public void closed() throws IOException {}
+ public void closed() throws IOException {
+ // noop
+ }
/**
* Called to indicate, that an error occurred on the underlying stream.

MODIFY
src/main/java/org/apache/commons/io/input/ProxyReader.java
src/main/java/org/apache/commons/io/input/ProxyReader.java
@@ -222,6 +222,7 @@ public boolean markSupported() {
* @throws IOException if the pre-processing fails
*/
protected void beforeRead(final int n) throws IOException {
+ // noop
}
/**
@@ -242,6 +243,7 @@ protected void beforeRead(final int n) throws IOException {
* @throws IOException if the post-processing fails
*/
protected void afterRead(final int n) throws IOException {
+ // noop
}
/**

MODIFY
src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
*/
@Override
public void init(final Tailer tailer) {
+ // noop
}
/**
@@ -37,6 +38,7 @@ public void init(final Tailer tailer) {
*/
@Override
public void fileNotFound() {
+ // noop
}
/**
@@ -47,6 +49,7 @@ public void fileNotFound() {
*/
@Override
public void fileRotated() {
+ // noop
}
/**
@@ -55,6 +58,7 @@ public void fileRotated() {
*/
@Override
public void handle(final String line) {
+ // noop
}
/**
@@ -63,6 +67,7 @@ public void handle(final String line) {
*/
@Override
public void handle(final Exception ex) {
+ // noop
}
/**
@@ -76,5 +81,6 @@ public void handle(final Exception ex) {
* @since 2.5
*/
public void endOfFileReached() {
+ // noop
}
}

MODIFY
src/main/java/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.java
src/main/java/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.java
*/
@Override
public void onStart(final FileAlterationObserver observer) {
+ // noop
}
/**
@@ -43,6 +44,7 @@ public void onStart(final FileAlterationObserver observer) {
*/
@Override
public void onDirectoryCreate(final File directory) {
+ // noop
}
/**
@@ -52,6 +54,7 @@ public void onDirectoryCreate(final File directory) {
*/
@Override
public void onDirectoryChange(final File directory) {
+ // noop
}
/**
@@ -61,6 +64,7 @@ public void onDirectoryChange(final File directory) {
*/
@Override
public void onDirectoryDelete(final File directory) {
+ // noop
}
/**
@@ -70,6 +74,7 @@ public void onDirectoryDelete(final File directory) {
*/
@Override
public void onFileCreate(final File file) {
+ // noop
}
/**
@@ -79,6 +84,7 @@ public void onFileCreate(final File file) {
*/
@Override
public void onFileChange(final File file) {
+ // noop
}
/**
@@ -88,6 +94,7 @@ public void onFileChange(final File file) {
*/
@Override
public void onFileDelete(final File file) {
+ // noop
}
/**
@@ -97,6 +104,7 @@ public void onFileDelete(final File file) {
*/
@Override
public void onStop(final FileAlterationObserver observer) {
+ // noop
}
}

MODIFY
src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
@@ -188,6 +188,7 @@ public void run() {
try {
Thread.sleep(interval);
} catch (final InterruptedException ignored) {
+ // ignore
}
}
}

MODIFY
src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
@@ -285,6 +285,7 @@ public void initialize() throws Exception {
* @throws Exception if an error occurs
*/
public void destroy() throws Exception {
+ // noop
}
/**

MODIFY
src/main/java/org/apache/commons/io/output/ProxyOutputStream.java
src/main/java/org/apache/commons/io/output/ProxyOutputStream.java
@@ -133,6 +133,7 @@ public void close() throws IOException {
* @throws IOException if the pre-processing fails
*/
protected void beforeWrite(final int n) throws IOException {
+ // noop
}
/**
@@ -150,6 +151,7 @@ protected void beforeWrite(final int n) throws IOException {
* @throws IOException if the post-processing fails
*/
protected void afterWrite(final int n) throws IOException {
+ // noop
}
/**

Comment empty block. Formatting.