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 - Missing new keyword, hint.
Summary: Missing new keyword, hint.
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Rastislav Komara
Depends on:
Reported: 2007-08-11 20:30 UTC by _ gtzabari
Modified: 2013-01-03 20:34 UTC (History)
1 user (show)

See Also:
Exception Reporter:

The source-code triggering the problem (259 bytes, text/plain)
2007-08-11 20:31 UTC, _ gtzabari

Note You need to log in before you can comment on or make changes to this bug.
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