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 111760 - PatternSyntaxException in 'Go to Type' dialog.
Summary: PatternSyntaxException in 'Go to Type' dialog.
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-02 14:58 UTC by _ leonchiver
Modified: 2007-09-26 09:14 UTC (History)
1 user (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 _ leonchiver 2007-08-02 14:58:38 UTC
In today's CVS build:

If you enter Edit*\Re in the textfield of the 'Go to Type' dialog (which I did by accident) that's what happens:

java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 7
Edit.*\Re.*
       ^
	at java.util.regex.Pattern.error(Pattern.java:1713)
	at java.util.regex.Pattern.escape(Pattern.java:2177)
	at java.util.regex.Pattern.atom(Pattern.java:1952)
	at java.util.regex.Pattern.sequence(Pattern.java:1834)
	at java.util.regex.Pattern.expr(Pattern.java:1752)
	at java.util.regex.Pattern.compile(Pattern.java:1460)
	at java.util.regex.Pattern.<init>(Pattern.java:1133)
	at java.util.regex.Pattern.compile(Pattern.java:847)
	at org.netbeans.modules.java.source.usages.LuceneIndex.getDeclaredTypes(LuceneIndex.java:287)
	at org.netbeans.modules.java.source.usages.PersistentClassIndex$2.run(PersistentClassIndex.java:124)
	at org.netbeans.modules.java.source.usages.PersistentClassIndex$2.run(PersistentClassIndex.java:122)
	at org.netbeans.modules.java.source.usages.ClassIndexManager.readLock(ClassIndexManager.java:102)
	at org.netbeans.modules.java.source.usages.PersistentClassIndex.getDeclaredTypes(PersistentClassIndex.java:122)
	at org.netbeans.api.java.source.ClassIndex.getDeclaredTypes(ClassIndex.java:289)
	at org.netbeans.modules.java.source.ui.JavaTypeProvider.getTypeNames(JavaTypeProvider.java:194)
	at org.netbeans.modules.jumpto.type.GoToTypeAction$Worker.getTypeNames(GoToTypeAction.java:349)
	at org.netbeans.modules.jumpto.type.GoToTypeAction$Worker.run(GoToTypeAction.java:313)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 1 Andrei Badea 2007-08-02 16:17:32 UTC
IIRC same issue in Go to File. Perhaps Pattern.quote() can help.
Comment 2 Petr Hrebejk 2007-09-11 13:37:56 UTC
Checking in JavaTypeProvider.java;
/cvs/java/sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeProvider.java,v  <--  JavaTypeProvider.java
new revision: 1.3; previous revision: 1.2
done