You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/12/17 21:23:02 UTC
(commons-io) 02/02: [IO-781] Make CharSequenceInputStream.available() more correct in the face of multibyte encodings #525
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 52c92156c2cb7f748e3fa9385f41912f7700505f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 17 16:22:56 2023 -0500
[IO-781] Make CharSequenceInputStream.available() more correct in the
face of multibyte encodings #525
---
.../java/org/apache/commons/io/input/CharSequenceInputStreamTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java b/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
index be5c0b3f..8ad0db8e 100644
--- a/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
@@ -78,8 +78,10 @@ public class CharSequenceInputStreamTest {
"Shift_JIS".equalsIgnoreCase(csName);
}
+ /**
+ * IO-781 available() returns 2 but only 1 byte is read afterwards.
+ */
@Test
- // IO-781 available() returns 2 but only 1 byte is read afterwards
public void testAvailable() throws IOException {
final Charset charset = Charset.forName("Big5");
final CharSequenceInputStream in = new CharSequenceInputStream("\uD800\uDC00", charset);