Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 187017

Summary: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 * ^
Product: cnd Reporter: Alexander Simon <alexvsimon>
Component: NavigationAssignee: Andrey Yamkovoy <kaktus>
Status: VERIFIED FIXED QA Contact: issues <>
Priority: P2 CC: artisan, hmichel, issues, jkovalsky, jmichelberger, kidnapper, misterm, vkvashin
Version: 6.x   
Target Milestone: 6.x   
Hardware: All   
OS: All   
Whiteboard: EXCEPTIONS_REPORT 69patch2-verified
Issue Type: DEFECT Exception Report: 170330
Attachments: stacktrace

Description Alexander Simon 2010-06-01 09:14:12 UTC
Build: NetBeans IDE Dev (Build 100531-0be187cd4433)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02

java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
   at java.util.regex.Pattern.error(
   at java.util.regex.Pattern.sequence(
   at java.util.regex.Pattern.expr(
   at java.util.regex.Pattern.compile(
   at java.util.regex.Pattern.<init>(
   at java.util.regex.Pattern.compile(
Comment 1 Alexander Simon 2010-06-01 09:14:16 UTC
Created attachment 99698 [details]
Comment 2 Vladimir Kvashin 2010-07-06 04:50:27 UTC
Created attachment 100614 [details]

In C/C++ project, in Go to Type, I typed "*" in the name field - exception occurred
Comment 3 Exceptions Reporter 2010-07-23 08:58:02 UTC
This bug already has 5 duplicates 
Comment 4 jmichelberger 2010-07-23 09:52:03 UTC
Created attachment 101001 [details]
Comment 5 kidnapper 2010-07-24 19:58:10 UTC
Created attachment 101012 [details]

Using ctrl + O to lookup *Login named classes
Comment 6 Alexei Mokeev 2010-07-26 12:24:15 UTC
*** Bug 188269 has been marked as a duplicate of this bug. ***
Comment 7 Alexei Mokeev 2010-07-26 12:24:47 UTC
*** Bug 187182 has been marked as a duplicate of this bug. ***
Comment 8 Michel Graciano 2010-08-06 18:10:58 UTC
Created attachment 101251 [details]
Comment 9 Michel Graciano 2010-08-06 18:12:50 UTC
After update fro 6.9.1 I can't use the Got to file since when I need to use * keyword.
Comment 10 Michel Graciano 2010-08-06 18:20:16 UTC
Created attachment 101253 [details]
Comment 11 Alexei Mokeev 2010-08-09 06:06:15 UTC
The roor reason is that pattern should be converted into correct regexp. 14 reports so far.
Comment 12 Andrey Yamkovoy 2010-08-17 14:43:59 UTC
Comment 13 Andrey Yamkovoy 2010-08-17 14:52:50 UTC
Fixed in the main.
Comment 14 Michel Graciano 2010-08-17 19:06:00 UTC
changeset: main #331183437671

Comment 15 Quality Engineering 2010-08-18 03:24:02 UTC
Integrated into 'main-golden', will be available in build *201008180001* on (upload may still be in progress)
User: Andrey Yamkovoy <>
Log: Fix for #187017 - java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 * ^
Comment 16 Vladimir Kvashin 2010-08-19 15:32:13 UTC
The fix caused the f
Comment 17 Vladimir Kvashin 2010-08-19 15:34:33 UTC
Sorry for incomplete comment. 
The fix causes regression:
previously such patterns as ".*" worked, now they do not.
Comment 18 Vladimir Kvashin 2010-08-19 15:40:25 UTC
In NB versions 6.1 through 6.9 (I didn't check earlier versions) patterns like ".*" worked. The ".*" pattern showed just all symbols.
Comment 19 Alexei Mokeev 2010-08-19 15:47:00 UTC
According to the description this field accepts wildcards, not the regexps.
In this sence ?* should work instead of .*

Just wondering how to distiguish regexp  w/o 'regexp' checkbox.
Comment 20 Vladimir Kvashin 2010-08-19 16:42:09 UTC
What you propose seems reasonable... but is changing the behavior right thing to do after it worked certain way for many releases? - that's the question. I believe we should just make it smarter.
Comment 21 Vladimir Kvashin 2010-08-19 16:51:39 UTC
What about simplistic decision: try treating it as a regexp, in the case we get an exception when compiling this regexp, we do the replacement you propose?
Comment 22 Vladimir Kvashin 2010-08-20 10:49:50 UTC
We finally agreed that, according to the text in the dialog, regular expressions are not supported. Only "?" and "*" wildcards are.
Comment 23 Egor Ushakov 2010-09-15 08:57:20 UTC
please nominate it for possible patch
Comment 24 Michel Graciano 2010-09-28 14:43:13 UTC
Any chance to backport it for 6.9?
Comment 25 Jiri Kovalsky 2010-09-29 12:49:47 UTC
Michel, I see this unrealistic. Unless, Andrey builds new module compatible with 6.9, has this tested fully and asks for publishing on the 6.9 UC. Andrey?
Comment 26 Michel Graciano 2010-09-29 12:58:40 UTC
Just let me know if I can help with anything. Of course I can help to test it without any problem.
Comment 27 Alexei Mokeev 2010-10-06 11:33:01 UTC
Hi Jirka, Andrey doesn't work any more in this area.
Comment 28 Jiri Kovalsky 2010-10-06 12:04:23 UTC
And who does, Alexei?
Comment 29 Petr Suchomel 2010-10-18 09:18:37 UTC
Backported in release692
Comment 30 Alexander Pepin 2010-10-27 13:08:37 UTC
verified in patch2 candidate
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo