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


##########
src/main/java/org/apache/commons/io/output/StringBuilderWriter.java:
##########
@@ -149,9 +151,8 @@ public String toString() {
      */
     @Override
     public void write(final char[] value, final int offset, final int length) {
-        if (value != null) {
-            builder.append(value, offset, length);
-        }
+        IOUtils.checkFromIndexSize(value, offset, length);
+        builder.append(value, offset, length);

Review Comment:
   You are right, the behavior changes, but users are probably not exploiting 
this behavior, since they need to write code that works with **any** `Writer` 
implementation.
   
   @garydgregory, what do you think?



-- 
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