Bug 271065 - Inline refacroring misses parent object reference
Inline refacroring misses parent object reference
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
Dev
PC Other
: P2 (vote)
: Dev
Assigned To: Svata Dedic
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo