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 72980 - Project template generation and strange variable
Summary: Project template generation and strange variable
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: rmatous
URL: http://www.dyadem.com
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 17:43 UTC by cris_malinescu
Modified: 2006-02-24 08:18 UTC (History)
1 user (show)

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 cris_malinescu 2006-02-23 17:43:22 UTC
Hello,
I found that the wizard used for generating a new project template using an 
existing project structure generates a java class file containing a member 

public class XYZPanelVisual extends JPanel implements DocumentListener { ...

private int type;

//which is never referred or used in the class, but redundantly/no effect 
initialized in the generated constructor like: 

public XYZPanelVisual(XYZWizardPanel panel) {
  initComponents();
  this.panel = panel;
  
  //-> 
  this.type = type; 
  //<-
  
  // Register listener on the textFields to make the automatic updates
  projectNameTextField.getDocument().addDocumentListener(this);
  projectLocationTextField.getDocument().addDocumentListener(this);
 }

... 
}

What's the purpose of this variable and the redundant/no effect assignment?

Regards,
Cris
Comment 1 rmatous 2006-02-24 08:18:09 UTC
Fixed in trunk(5.0u2):
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/project/templatePanelVisual.javx,v
 new revision: 1.11; previous revision: 1.10

Fixed in 50.u1:
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/project/templatePanelVisual.javx,v
 new revision: 1.10.6.1; previous revision: 1.10