[
https://issues.apache.org/jira/browse/IO-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17356062#comment-17356062
]
Yan Duan commented on IO-736:
-----------------------------
[~ggregory] I've tested with 2.9.0 and the bug still persists, although I'm not
able to paste my code due to company restriction, any test calling
IOUtils.length should be able to reproduce this issue:
mockStatic(IOUtils.class);
when(IOUtils.toString(any(BOMInputStream.class),
any(Charset.class))).thenReturn("Success");
thanks
> commons-io version 2.7+: IOUtils.length(boms) returns 0 even if boms is not
> empty
> ---------------------------------------------------------------------------------
>
> Key: IO-736
> URL: https://issues.apache.org/jira/browse/IO-736
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.7
> Reporter: Yan Duan
> Priority: Major
> Attachments: image-2021-06-02-16-47-57-567.png
>
>
> in"BOMInputStream" class, IOUtils.length(boms) would return 0 and breaks the
> method while "boms" has five elements:
> !image-2021-06-02-16-47-57-567.png|width=450,height=300!
> please investigate and provide a fix, thanks!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)