PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3374 *** shadow/3374 Sun Sep 2 09:46:33 2001 --- shadow/3374.tmp.12658 Sun Sep 2 09:46:33 2001 *************** *** 0 **** --- 1,37 ---- + +============================================================================+ + | ArrayIndexOutOfBoundsException | + +----------------------------------------------------------------------------+ + | Bug #: 3374 Product: ORO | + | Status: NEW Version: 2.0.4 | + | Resolution: Platform: Sun | + | Severity: Blocker OS/Version: Solaris | + | Priority: Other Component: Main | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The Perl5Matcher.matches method is throwing an ArrayIndexOutOfBoundsException. + Here's the relative code: + + Foo.class - + + private static PatternCompiler patternCompiler = new Perl5Compiler(); + Pattern regexPattern = patternCompiler.compile("[A-Za-z]*"); + + Bar.class - + + private static PatterMatcher patternMatcher = new Perl5Matcher(); + boolean match = patternMatcher.matches("Bugs Bunny", regexPattern); + + Note, my application is multi-threaded and, as such, there are multiple threads + calling the Perl5Matcher.matches method at the same time. It appears that the + exception is thread related because a) I didn't see the exception on my windows + machine, b) the exception is random and c) I haven't seen the exception since I + changed the code such that the patternMatcher is no longer static. So, is the + method thread safe? It doesn't appear to be. + + Tom
