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 108128 - Unchecked conversion in generated databinding code
Summary: Unchecked conversion in generated databinding code
Status: VERIFIED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Binding (show other bugs)
Version: 6.x
Hardware: All Linux
: P4 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 12:23 UTC by Jiri Vagner
Modified: 2007-08-20 14:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
108128.png (9.11 KB, image/png)
2007-06-26 12:26 UTC, Jiri Vagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Vagner 2007-06-26 12:23:26 UTC
After db table drag&drop above form, it generates error - unchecked conversion. Check the screenshot.

Maybe it's not important, but that underlined line in generated code looks ugly. :)
Comment 1 Jiri Vagner 2007-06-26 12:26:43 UTC
Created attachment 44398 [details]
108128.png
Comment 2 Jiri Vagner 2007-06-26 12:32:44 UTC
Steps to reproduce:
 - create java application project and add jframe form
 - browse any database table in database explorer in Services tab
 - drag db table from explorer and drop it above form holding CTRL key
 - go to form source code and check the content of initComponents() method

Product Version: NetBeans IDE Dev (Build 200706260205)
Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
Comment 3 Jan Stola 2007-06-26 13:08:54 UTC
We cannot get rid of this warning unfortunately. Query.getResultList() method doesn't have its return type generified. 
The actual return type depends on the JPA query encapsulated by the Query object - that is know to GUI builder. If we 
include a cast then we obtain another warning (unchecked cast). It would be possible to generate @SuppressWarning 
annotation for the initComponents() method, but this is not a clean solution because it suppresses all potential 
unchecked warnings in this method.
Comment 4 Jiri Vagner 2007-08-20 14:09:05 UTC
Ok, verified.