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 247282

Summary: Code completion does not offer initializing constructor for final fields
Product: java Reporter: ebakke
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: normal CC: brettryan
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description ebakke 2014-09-18 19:09:56 UTC
Suppose I create a class with the following initial content (the "|" indicates my cursor, not an actual character):

public class FooClass {
  private final boolean koko;
  private final boolean koko2;

  |
}

Now, pressing Ctrl+Space at the cursor ("|") to open up the code completion window offers me only to generate an empty constructor. If I remove the "final" keyword from one of the fields, code completion offers a constructor that initializes _both_ fields from arguments.

This seems to be a new problem in NetBeans 8.0.1--I never had the problem in 8.0 (this comes up every time I create a new immutable class).
Comment 1 Jiri Prox 2014-09-19 07:36:28 UTC

*** This bug has been marked as a duplicate of bug 245667 ***
Comment 2 Jiri Prox 2014-12-16 11:59:58 UTC
*** Bug 249376 has been marked as a duplicate of this bug. ***