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.
Summary: | Refactor -> Introduce Method... inside lambda does not consider referenced finals | ||
---|---|---|---|
Product: | java | Reporter: | SirIntellegence |
Component: | Refactoring | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | java test file |
This bug results in users having to introduce a method manually or resorting to creative solutions... (Like Refactor->Convert Anonymous to Member) Fixed in jet-main#4d867a2b7bc7 Integrated into 'main-silver', will be available in build *201707260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/4d867a2b7bc7 User: Svata Dedic <sdedic@netbeans.org> Log: #270953: introduce method must scan the whole method for local variable accesses, not just the lambda |
Created attachment 164615 [details] java test file Using the attached java file, select all or part of the contents of the lambda expression (excluding the "item->"), and use Refactor -> Introduce Method. The resulting method will only have one param for "item" and none for the referenced explicit and implicit final variables.