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 130831

Summary: JSF CRUD generates wrong imports
Product: javaee Reporter: Jan Horvath <jhorvath>
Component: JSFAssignee: issues@javaee <issues>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: Macintosh   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: project

Description Jan Horvath 2008-03-21 23:19:15 UTC
Product Version: NetBeans IDE Dev (Build 200803210006)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)

-create web project
-create entity class with same name as any class on the project classpath, but in different package (e.g. "entity.Method")
-generate JFS CRUD
-import in the generated controller class is invalid (in this case - imports java.lang.reflect.Method)

sample project attached
Comment 1 Jan Horvath 2008-03-21 23:20:09 UTC
Created attachment 58876 [details]
project
Comment 2 Matthew Bohm 2008-03-22 06:10:00 UTC
Marking invalid. It so happens that JSF CRUD always generates an import for java.lang.reflect.Method.
Comment 3 Jan Horvath 2008-03-25 10:49:07 UTC
We shouldn't generate uncompilable code. We should handle similar cases for names like List, ...
Comment 4 Matthew Bohm 2008-03-28 04:14:53 UTC
Seems minor, but agreed.
Comment 5 Jiri Prox 2008-04-11 01:14:02 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 6 Matthew Bohm 2008-08-27 17:53:02 UTC
Minor, P4.
Comment 7 Martin Balin 2016-07-07 08:56:24 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss