[ 
https://issues.apache.org/jira/browse/IO-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory closed IO-302.
------------------------------


Version 2.2 has been released and addresses this issue.
                
> ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without 
> BOM multiple times
> -----------------------------------------------------------------------------------------------
>
>                 Key: IO-302
>                 URL: https://issues.apache.org/jira/browse/IO-302
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Streams/Writers
>    Affects Versions: 2.1
>         Environment: Win7 64bit, Java 6 32bit
>            Reporter: Jan Steuerwald
>            Assignee: Gary D. Gregory
>             Fix For: 2.2
>
>         Attachments: IO-302.patch, Test.java, testfileBOM.xml, 
> testfileNoBOM.xml
>
>
> Resetting the BOMInputStream doesn't reset the _fbLength_ member variable. 
> This causes _fbLength_ to grow bigger than the _firstBytes_ array (when the 
> file doesn't contain a BOM), which leads to an ArrayIndexOutOfBoundsException 
> in the _readFirstBytes_ method.
> The attached test case reveals the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to