Add NullPrintStream.INSTANCE and deprecate NULL_PRINT_STREAM.
MODIFY
src/changes/changes.xml
src/changes/changes.xml
@@ -90,6 +90,9 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="add" due-to="Gary Gregory">
Add NullOutputStream.INSTANCE and deprecate NULL_OUTPUT_STREAM.
</action>
+ <action dev="ggregory" type="add" due-to="Gary Gregory">
+ Add NullPrintStream.INSTANCE and deprecate NULL_PRINT_STREAM.
+ </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/output/NullPrintStream.java
src/main/java/org/apache/commons/io/output/NullPrintStream.java
/**
* The singleton instance.
+ *
+ * @since 2.12.0
+ */
+ public static final NullPrintStream INSTANCE = new NullPrintStream();
+
+ /**
+ * The singleton instance.
+ *
+ * @deprecated Use {@link #INSTANCE}.
*/
- public static final NullPrintStream NULL_PRINT_STREAM = new NullPrintStream();
+ @Deprecated
+ public static final NullPrintStream NULL_PRINT_STREAM = INSTANCE;
/**
* Constructs an instance.

MODIFY
src/test/java/org/apache/commons/io/output/NullPrintStreamTest.java
src/test/java/org/apache/commons/io/output/NullPrintStreamTest.java
@@ -47,7 +47,7 @@ public void testNullNewInstance() throws IOException {
@Test
public void testNullSingleton() throws IOException {
- try (final NullPrintStream nos = NullPrintStream.NULL_PRINT_STREAM) {
+ try (final NullPrintStream nos = NullPrintStream.INSTANCE) {
process(nos);
}
}

Add NullPrintStream.INSTANCE and deprecate NULL_PRINT_STREAM.