United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4164649 : java.io.CharArrayReader(array[], off, len) no exception if off+len is outofbound

Details
Type:
Bug
Submit Date:
1998-08-07
Status:
Resolved
Updated Date:
2004-10-01
Project Name:
JDK
Resolved Date:
2004-10-01
Component:
core-libs
OS:
generic
Sub-Component:
java.io
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.1.5,1.2.0,5.0
Fixed Versions:
5.0 (b32)

Related Reports
Relates:
Relates:

Sub Tasks

Description
If I construct a CharArrayReader(chararray, 5, 5) where the chararray is  7-characters,  no exception is thrown.  I would expect a IndexOutOfBoundsException.  

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-b32
tiger-beta

VERIFIED IN:
1.5.0_01


                                     
2004-10-02
EVALUATION

Oops.  -- mr@eng 1998/11/24

---
The fix is OK.
It would be good to close a tag <tt> in the javadoc description
for public CharArrayReader(char[] buf, int offset, int length) constructor:

<tt>buf.length-offset<tt>  -->  <tt>buf.length-offset</tt>
                     ^^^^ 
###@###.### 2004-09-15
                                     
2004-09-15



Hardware and Software, Engineered to Work Together