Bug 12271

Summary: String index out of range: 130
Product: Taglibs Reporter: leena.shah
Component: String TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: CLOSED FIXED    
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description leena.shah 2002-09-03 18:00:18 UTC
I am using the truncateNicely Tag with a lower limit of 110 and upper of 130. 
It works fine except for strings whose length falls in the range between the 
two. I have a string "The PowerStar 4600 is a state of the art departmental 
server providing high availability and excellent data protection." which is of 
120 characters. Since it cannot find a space, it tries to get the substring 
using the upper index which doesnt exist for that string and hence I get an out 
of range exception.
Comment 1 Henri Yandell 2002-09-10 00:47:30 UTC
Tim Kettering has provided a patch to fix this [the initial code is his though he's not a 
committer yet]. It's committed as of 5 minutes ago and will go into the nightly build tonight.