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 - Code completion does not offer initializing constructor for final fields
Summary: Code completion does not offer initializing constructor for final fields
Status: RESOLVED DUPLICATE of bug 245667
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.1
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 249376 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-09-18 19:09 UTC by ebakke
Modified: 2014-12-16 11:59 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 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. ***