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 262139

Summary: Sometimes unable to hyperlink into classes with '$' in the name
Product: java Reporter: petrk
Component: SourceAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH_AVAILABLE
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample project
Not very accurate patch
More correct patch, but still not everything is handled
Corrected project
Third version of the project

Description petrk 2016-05-18 14:01:14 UTC
Created attachment 159799 [details]
Sample project

Almost all identifiers related to class First$Second$Third in file JavaApplication3.java are not correctly resolved.
Comment 1 petrk 2016-05-18 14:02:50 UTC
Created attachment 159800 [details]
Not very accurate patch
Comment 2 petrk 2016-05-18 17:18:08 UTC
Created attachment 159805 [details]
More correct patch, but still not everything is handled

Patch also fixes case when hyperlink point is inside inner class which in turn is inside class with '$' in its name
Comment 3 Dusan Balek 2016-06-07 09:10:02 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/1a31540833b6
Comment 4 Vladimir Voskresensky 2016-06-08 08:16:00 UTC
Thank you very much!
Comment 5 petrk 2016-06-16 13:15:50 UTC
Thanks, that fixes almost all issues, but the last one line in main function in file JavaApplication3.java in attached project still has wrong hyperlinks. 

Particularly: the line is "First$Second$Third.Inner1.roo();"
Here hyperlink on "Inner1" navigates to class First$Second, hyperlink on "roo()" does the same.
Comment 6 Dusan Balek 2016-06-16 14:56:22 UTC
Unfortunately, the attached JavaApplication3.java does not contain line First$Second$Third.Inner1.roo();

Could you please attach correct sample project? Thanks.
Comment 7 petrk 2016-06-16 15:42:39 UTC
Created attachment 160071 [details]
Corrected project
Comment 8 petrk 2016-06-16 15:43:42 UTC
Sorry, I must have changed sample project. The new one is attached
Comment 9 Dusan Balek 2016-06-17 09:42:38 UTC
Fixed in jet-main. Thanks for the reproducible test case.

http://hg.netbeans.org/jet-main/rev/395f1a57b65c
Comment 10 Quality Engineering 2016-06-18 03:12:01 UTC
Integrated into 'main-silver', will be available in build *201606180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/395f1a57b65c
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #262139 - Sometimes unable to hyperlink into classes with '$' in the name - fix cont.
Comment 11 petrk 2016-06-18 15:01:52 UTC
Created attachment 160089 [details]
Third version of the project

Thanks a lot! I'm pretty sure that now we won't have any issues in real code. But just for your information - I've played a bit with the test project and it is still not difficult to find a case which is not supported :)
Comment 12 petrk 2016-06-18 15:03:11 UTC
Forgot to describe the problem: in JavaApplication3.java hyperlink to "foo()" navigates into "First$Second" class
Comment 13 Dusan Balek 2016-06-20 13:04:37 UTC
Third attempt to fix.

http://hg.netbeans.org/jet-main/rev/45ee547e907b