This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 119819 - IAE from DocumentFinder.findReplaceImpl
Summary: IAE from DocumentFinder.findReplaceImpl
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sergey Petrov
: 160807 (view as bug list)
Depends on:
Reported: 2007-10-23 17:33 UTC by Jesse Glick
Modified: 2009-06-24 16:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Stack trace (3.34 KB, text/plain)
2007-10-23 17:33 UTC, Jesse Glick

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-10-23 17:33:20 UTC
071022. Trying to regexp search and replace:




on e.g.


Probably the replacement syntax was wrong, but this was not a very polite way to tell me so.
Comment 1 Jesse Glick 2007-10-23 17:33:45 UTC
Created attachment 51515 [details]
Stack trace
Comment 2 Vitezslav Stejskal 2007-10-24 12:18:11 UTC
Reproducible in a dev build.
Comment 3 Jiri Prox 2008-04-11 00:42:53 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 4 Alexei Mokeev 2009-04-10 10:32:55 UTC
Still the case for 6.7 trunk (20090408):
java.lang.IllegalArgumentException: Illegal group reference
	at java.util.regex.Matcher.appendReplacement(
	at java.util.regex.Matcher.replaceFirst(
Comment 5 Alexei Mokeev 2009-04-16 10:34:51 UTC
*** Issue 160807 has been marked as a duplicate of this issue. ***
Comment 6 Alexei Mokeev 2009-04-16 10:36:36 UTC
A brilliant summary from 160807
Ideally the dialog should verify entered regex patterns and clearly communicate errors to the user without crashing.
Comment 7 Sergey Petrov 2009-04-20 16:55:42 UTC
suggested fix:
with regedp option on, check entered string on typing and disable replace/find buttons and provide red colored message
at the bottom of replace dialog if pattern is wrong. need to try if it will look good with some empty space if all is ok.
Comment 8 Sergey Petrov 2009-04-22 10:16:52 UTC

finally no additional label was added, red colored search/replace strings are used to show problems.
replace is disabled if pattern is wrong.
Comment 9 Quality Engineering 2009-04-23 08:55:48 UTC
Integrated into 'main-golden', will be available in build *200904230201* on (upload may still be in progress)
Log: fix #119819 added online verification for search string and replace string, find replace buttons are disabled in case of error, corresponding text field is highlighted with red.