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 271065 - Inline refacroring misses parent object reference
Summary: Inline refacroring misses parent object reference
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: Dev
Hardware: PC Other
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-09 20:51 UTC by Maksim Khramov
Modified: 2017-07-26 02:09 UTC (History)
0 users

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 Maksim Khramov 2017-07-09 20:51:01 UTC
Product Version: NetBeans IDE Dev (Build 201706280001)
Java: 1.8.0_131; Java HotSpot(TM) 64-Bit Server VM 25.131-b11

Steps to reproduce:
See source code:

package testinline;

public class TestInline {
    private Object[] entities;

    public Object[] getEntities() {
        return entities;
    }

    public void copy(TestInline source)
    {
        this.entities = source.getEntities();
    }
}

invoke Inline refactoring on getEntities method
updated copy method expected to be:
    public void copy(TestInline source)
    {
        this.entities = source.entities;
    }
but actual one is
    public void copy(TestInline source)
    {
        this.entities = entities;
    }
Comment 1 Svata Dedic 2017-07-21 19:48:25 UTC
Will be fixed by jet-main#61e65be3e6bf
Comment 2 Quality Engineering 2017-07-26 02:09:09 UTC
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/61e65be3e6bf
User: Svata Dedic <sdedic@netbeans.org>
Log: #271065: inlined code uses correct instance even when the class is same. Improved symbol accessibility detection