You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/04/16 23:52:43 UTC

[GitHub] [commons-io] Marcono1234 commented on a diff in pull request #293: Refactor `ReaderInputStream` implementation

Marcono1234 commented on code in PR #293:
URL: https://github.com/apache/commons-io/pull/293#discussion_r851683178


##########
src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java:
##########
@@ -71,17 +72,21 @@ public CharSequenceInputStream(final CharSequence cs, final Charset charset) {
      * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character.
      */
     public CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize) {
+        Objects.requireNonNull(cs);
+        if (bufferSize < 1) {
+            throw new IllegalArgumentException("Buffer size must be >= 1");
+        }
+        // TODO: bufferSize is unused

Review Comment:
   Will change this to pass it to `ReaderInputStream` and use it as inital `encoderOut` size there.



-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org