Bug 28412 - Re.match throws exception if called concurrently
Summary: Re.match throws exception if called concurrently
Status: CLOSED INVALID
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-15 13:53 UTC by Brice Beard
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brice Beard 2004-04-15 13:53:04 UTC
java.lang.StringIndexOutOfBoundsException: String index out of range: 81
        at java.lang.String.charAt(String.java:582)
        at org.apache.regexp.StringCharacterIterator.charAt(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchNodes(Unknown Source)
        at org.apache.regexp.RE.matchAt(Unknown Source)
        at org.apache.regexp.RE.match(Unknown Source)
        at org.apache.regexp.RE.match(Unknown Source)
        at org.apache.regexp.RE.match(Unknown Source)
        at com.chase.gtd.util.ExceptionHandlerImp.getAction(ExceptionHandlerImp.
java:305)

call is:

  deails.mPattern.match(location + " : " + msg)

this is called by several threads concurrently
Comment 1 Oleg Sukhodolsky 2004-04-16 12:33:27 UTC
I'm not sure if RE is thread-safe, but anyway it would be great to have a test.
Comment 2 Vadim Gritsenko 2004-05-10 18:31:17 UTC
RE is not thread safe, which is, in fact, is documented here:
  http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html

(last paragraph)