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 112590

Summary: Missing new keyword, hint.
Product: java Reporter: _ gtzabari <gtzabari>
Component: SourceAssignee: Rastislav Komara <moonko>
Status: NEW ---    
Severity: blocker CC: markiewb
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: The source-code triggering the problem

Description _ gtzabari 2007-08-11 20:30:46 UTC
dev build 200708110000

There seems to be some sort of parsing bug. When I open the attached Java file I see the following bugs:

1) When AbstractList isn't in the import list, Fix-Imports adds it. But then if you invoke it a second time it removes it.
2) I am expecting to get an editor hint to implement all abstract methods in AbstractList but this hint never comes up.
Comment 1 _ gtzabari 2007-08-11 20:31:25 UTC
Created attachment 46480 [details]
The source-code triggering the problem
Comment 2 _ gtzabari 2007-08-11 20:35:23 UTC
The problem seems to be triggered by the following code sniplet:

return AbstractList<Image>()

notice the lack of "new" in between "return" and "AbstractList". I acknowledge this is a bug in my code but I expect
Netbeans to handle it more gracefully. Ideally it should display a compiler error on that line and the "Fix Error"
action should insert "new" in the appropriate location.
Comment 3 Petr Hrebejk 2007-09-01 12:59:07 UTC
If you  look int the tool tip of the lightbulb you'll see that the first error is illegal start of expression. That
means that the Summary of the bug is incorrect. 

It is not always possible (or doable for performance reasons) to guess correctly what the user meant. 
Comment 4 Rastislav Komara 2009-02-03 10:52:34 UTC
Overtake.