Add NullReader.INSTANCE.
MODIFY
src/changes/changes.xml
src/changes/changes.xml
@@ -99,6 +99,9 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="add" due-to="Gary Gregory">
Add NullInputStream.INSTANCE.
</action>
+ <action dev="ggregory" type="add" due-to="Gary Gregory">
+ Add NullReader.INSTANCE.
+ </action>
<!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Dependabot">
Bump Maven Javadoc plugin from 3.2.0 to 3.3.0.

MODIFY
src/main/java/org/apache/commons/io/input/NullReader.java
src/main/java/org/apache/commons/io/input/NullReader.java
*/
public class NullReader extends Reader {
+ /**
+ * The singleton instance.
+ *
+ * @since 2.12.0
+ */
+ public static final NullReader INSTANCE = new NullReader();
+
private final long size;
private long position;
private long mark = -1;

MODIFY
src/test/java/org/apache/commons/io/test/ThrowOnCloseReader.java
src/test/java/org/apache/commons/io/test/ThrowOnCloseReader.java
/**
* Default ctor.
*/
- @SuppressWarnings("resource")
public ThrowOnCloseReader() {
- super(new NullReader());
+ super(NullReader.INSTANCE);
}
/**

Add NullReader.INSTANCE.