Bug 1339

Summary: StringIndexOutOfBoundsException During Simple Perl5Util.split
Product: ORO Reporter: ckasow
Component: MainAssignee: Jakarta Notifications Mailing List <notifications>
Status: CLOSED FIXED    
Severity: normal    
Priority: P1    
Version: 2.0.1   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description ckasow 2001-04-13 18:09:11 UTC
This code snippit throws the StringIndexOutOfBoundsException shown below:

String txt = "a;b;c;d";
java.util.LinkedList list = new java.util.LinkedList();
Perl5Util perlUtil = new Perl5Util();
perlUtil.split(list,"m/\\s*;\\s*/",txt);

java.lang.StringIndexOutOfBoundsException: String index out of range: -3
	at java.lang.String.substring(String.java:1503)
	at org.apache.oro.text.perl.Perl5Util.split(Perl5Util.java:768)
	at org.apache.oro.text.perl.Perl5Util.split(Perl5Util.java:796)
Comment 1 Daniel F. Savarese 2001-04-15 20:24:06 UTC
This bug cannot be reproduced in the latest developer release (v2.0.2-dev2)
However, the bug appears to be an artifact of the PatternMatcherInput bug
introduced between 2.0 and 2.0.1.  Therefore, it was fixed when the
PatternMatcherInput bug was fixed in 2.0.2-dev1