Bug 29703

Summary: Failure with java.util.regex.Matcher reset()
Product: classpath Reporter: Jeff Johnston <jjohnstn>
Component: classpathAssignee: Ito Kazumitsu <kaz>
Status: RESOLVED FIXED    
Severity: normal CC: bkonrath, bug-classpath
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2006-11-06 01:29:23
Attachments: Test case displaying problem.

Description Jeff Johnston 2006-11-03 21:26:49 UTC
The Eclipse code uses regex to form a list of file names to perform operations such as rename or search upon.  The code to do this starts by creating a set of reusable matchers created with an empty string,  Then whenever it needs to do a regex match, it resets the string via the reset() method.  This does not work under classpath, but does work under the Sun JDK.

A simple testcase tested on i686 FC6 is attached.
Comment 1 Jeff Johnston 2006-11-03 21:28:31 UTC
Created attachment 12544 [details]
Test case displaying problem.
Comment 2 Ito Kazumitsu 2006-11-06 01:29:23 UTC
Resetting the instance variable this.inputCharIndexed = RE.makeCharIndexed(input, 0); has been missing in the metod reset(CharSequence input).  I will fix it ASAP. 
Comment 3 cvs-commit@developer.classpath.org 2006-11-06 16:48:26 UTC
Subject: Bug 29703

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Ito Kazumitsu <itokaz>	06/11/06 16:45:48

Modified files:
	.              : ChangeLog 
	java/util/regex: Matcher.java 

Log message:
	2006-11-06  Ito Kazumitsu  <kaz@maczuka.gcd.org>
	
		Fixes bug #29703
		* java/util/regex/Matcher.java(reset): Reset inputCharIndexed. 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8759&r2=1.8760
http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/regex/Matcher.java?cvsroot=classpath&r1=1.18&r2=1.19



Comment 4 Ito Kazumitsu 2006-11-06 22:24:45 UTC
Fixed.