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 262568 - GUI Designer variable declaration of JList subclass that does not take parameters is incorrect
Summary: GUI Designer variable declaration of JList subclass that does not take parame...
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Pavek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-24 20:53 UTC by mclaborn
Modified: 2018-01-02 01:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mclaborn 2016-06-24 20:53:38 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Linux version 4.4.0-24-generic running on amd64
Java; VM; Vendor = 1.8.0_92
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.92-b14

I have a class name MMList that is a subclass of javax.swing.JList.  The JList class does accept a parameter <E>, but MMList does not. 
When I drop a MMList instance on a GUI form, the declaration code include a parameter type of <String>. 
Example: 
  private com.csc.mm.MMList<String> listDebugPoints;

Since the MMList class does not accept a parameter, the variable declaration should not include a parameter.
Comment 1 mclaborn 2016-06-24 20:58:28 UTC
The instantiation code is also incorrect, using an empty parameter <>.
Comment 2 Jiri Kovalsky 2016-09-15 14:24:14 UTC
Tomáši, can you please evaluate this issue when you have free cycles? Thanks!
Comment 3 Tomas Pavek 2016-09-15 14:37:40 UTC
The workaround is to select the MMList component, go to Properties > Code and clear Type Parameters property. The property should not be automatically set in this case, it's a bug that it is.
Comment 4 mclaborn 2016-09-15 14:53:41 UTC
Thanks for that workaround.  It will certainly save me some time.  I've been closing the file in NB and editing outside NB.
Comment 5 mclaborn 2016-12-29 16:38:11 UTC
This is still broken in 
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Comment 6 mclaborn 2018-01-02 01:02:25 UTC
Still broken in: NetBeans IDE 8.2 (Build 201609300101)