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 249376 - Constructor generator does not include final members in class
Summary: Constructor generator does not include final members in class
Status: RESOLVED DUPLICATE of bug 247282
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-16 04:58 UTC by brettryan
Modified: 2014-12-16 11:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Normal constructor generator (46.53 KB, image/png)
2014-12-16 04:58 UTC, brettryan
Details
No constructor generator for all final (53.72 KB, image/png)
2014-12-16 04:59 UTC, brettryan
Details
Constructor generator where at least one member is not final (69.13 KB, image/png)
2014-12-16 04:59 UTC, brettryan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2014-12-16 04:58:16 UTC
Created attachment 151125 [details]
Normal constructor generator

Given a class with all members defined as final the constructor generator will not provide a template to generate a constructor for these members. If however one or more is not marked as final a constructor generator for all members is available, including the final members.

    // Provides only WidgetController()
    public class WidgetService {
        final WidgetService ws;
    }
    // Provides WidgetController(WidgetService)
    public class WidgetService {
        WidgetService ws;
    }
    // Provides WidgetController(WidgetService, FooService)
    public class WidgetService {
        final WidgetService ws;
        FooService fs;
    }
Comment 1 brettryan 2014-12-16 04:59:15 UTC
Created attachment 151126 [details]
No constructor generator for all final
Comment 2 brettryan 2014-12-16 04:59:55 UTC
Created attachment 151127 [details]
Constructor generator where at least one member is not final
Comment 3 Jiri Prox 2014-12-16 11:59:58 UTC

*** This bug has been marked as a duplicate of bug 247282 ***