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 232976 - [Introduce parameter] Default parameter value may be not accessible
Summary: [Introduce parameter] Default parameter value may be not accessible
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 11:20 UTC by Jiri Prox
Modified: 2016-07-07 07:15 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 Jiri Prox 2013-07-18 11:20:07 UTC
Introduce parameter may produce not-compilable when part of expression, which the parameter is introduced from,  is not accessible at the place of method usage.

Steps to reproduce:
1)  have a class 

class Test {
   
    private int field = 1;
    
    public void x() {
        int i = field;
    }

}

method x is called in another class

2) introduce parameter

-> the call of method x() is changed to x(field), but 'field' is private


Product Version: NetBeans IDE Dev (Build 201307150106)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b40
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b98
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 1 Martin Balin 2015-09-17 11:15:38 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.
Comment 2 Jiri Prox 2015-09-17 16:23:52 UTC
still valid in 


Product Version: NetBeans IDE Dev (Build 201509170002)
Updates: Updates available
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 3 Martin Balin 2016-07-07 07:15:27 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss