ppkarwasz commented on code in PR #790:
URL: https://github.com/apache/commons-io/pull/790#discussion_r2394001255


##########
src/main/java/org/apache/commons/io/output/NullWriter.java:
##########
@@ -110,6 +112,7 @@ public void flush() {
      */
     @Override
     public void write(final char[] chr) {
+        write(chr, 0, chr.length);

Review Comment:
   I fixed the Javadoc of `NullWriter` and expanded the test suite in 
https://github.com/apache/commons-io/pull/790/commits/6585383d23a7cc02acfb977125b16e00965d5458.
   
   Now the class behaves like `Writer.nullWriter()`, except `close()` is a 
no-op.



##########
src/main/java/org/apache/commons/io/output/NullWriter.java:
##########
@@ -87,7 +89,7 @@ public Writer append(final CharSequence csq) {
      */
     @Override
     public Writer append(final CharSequence csq, final int start, final int 
end) {
-        //to /dev/null
+        IOUtils.checkFromToIndex(csq, start, end);

Review Comment:
   I fixed the Javadoc of `NullWriter` and expanded the test suite in 
https://github.com/apache/commons-io/pull/790/commits/6585383d23a7cc02acfb977125b16e00965d5458.
   
   Now the class behaves like `Writer.nullWriter()`, except `close()` is a 
no-op.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to