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 83877 - PatternSyntaxException when searching for a regex starting with asterisk
Summary: PatternSyntaxException when searching for a regex starting with asterisk
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-31 10:20 UTC by Andrei Chistiakov
Modified: 2006-09-01 10:50 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-08-31 10:20:18 UTC
Reproduced in build 060828 (JDK 1.6 Beta 2)

To reproduce the bug:
- open LoanApplication schema;
- press Ctrl+F to bring up Search toolbar;
- check 'Use Regular Exspression';
- enter *Type into the Find field and press Enter key.

java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
*Type
^
	at java.util.regex.Pattern.error(Pattern.java:1700)
	at java.util.regex.Pattern.sequence(Pattern.java:1865)
	at java.util.regex.Pattern.expr(Pattern.java:1739)
	at java.util.regex.Pattern.compile(Pattern.java:1447)
	at java.util.regex.Pattern.<init>(Pattern.java:1130)
	at java.util.regex.Pattern.compile(Pattern.java:822)
	at
org.netbeans.modules.xml.schema.ui.basic.search.ComponentNameSearchProvider.search(ComponentNameSearchProvider.java:86)
Comment 1 Nathan Fiedler 2006-09-01 00:55:05 UTC
Changed search feature to display the error message in the search control panel,
rather than letting the exception appear in the popup dialog.

Fixed in release55 branch.

xamui/src/org/netbeans/modules/xml/xam/ui/search/Bundle.properties;
new revision: 1.1.2.6; previous revision: 1.1.2.5
xamui/src/org/netbeans/modules/xml/xam/ui/search/SearchControlPanel.java;
new revision: 1.1.2.7; previous revision: 1.1.2.6
xamui/src/org/netbeans/modules/xml/xam/ui/search/SearchEvent.java;
new revision: 1.1.2.3; previous revision: 1.1.2.2
xamui/src/org/netbeans/modules/xml/xam/ui/search/SearchException.java;
new revision: 1.1.2.1; previous revision: 1.1
xamui/src/org/netbeans/modules/xml/xam/ui/search/SearchFieldPanel.java;
new revision: 1.1.2.6; previous revision: 1.1.2.5
xamui/src/org/netbeans/modules/xml/xam/ui/search/SearchListener.java;
new revision: 1.1.2.3; previous revision: 1.1.2.2
xamui/src/org/netbeans/modules/xml/xam/ui/search/SearchProvider.java;
new revision: 1.1.2.3; previous revision: 1.1.2.2
Comment 2 Andrei Chistiakov 2006-09-01 10:50:21 UTC
Verified in build 060831_2.