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: | Introduce local variable refactoring produces garbled results | ||
---|---|---|---|
Product: | java | Reporter: | mclaborn <mclaborn> |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
See Also: | https://netbeans.org/bugzilla/show_bug.cgi?id=248785 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
IDE log
screen shot before refactoring screen shot after refactoring |
Description
mclaborn
2015-01-28 22:28:39 UTC
Created attachment 151718 [details]
IDE log
Created attachment 151719 [details]
screen shot before refactoring
Created attachment 151720 [details]
screen shot after refactoring
Seems similar in symptoms to 248785 I'v tried with a simplistic example but I didn't reproduce the defect; could you try to edit the example adding constructs (not the exact text, but rather the structure) like your real source code so it starts trigger the defect ? import java.util.ArrayList; import java.util.List; /** * * @author sdedic */ public class BugRefactoring { private List<C> workingOrders = new ArrayList<>(); public void foo(boolean par) { workingOrders.get(0).addCartPayment(0); if (par) { workingOrders.get(0).addCartPayment(1); } else { workingOrders.get(0).addCartPayment(2); } } public C getSomeValue() { return null; } static class C { public void addCartPayment(int a) { } } } I can no longer reproduce this problem, even on a full version of that class. OK, closing as WORKSFORME until reproduction is found |