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 240194 - [Introduce parameter] Check for parameter accessibility
Summary: [Introduce parameter] Check for parameter accessibility
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-10 10:26 UTC by Jiri Prox
Modified: 2016-07-07 07:16 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 2014-01-10 10:26:34 UTC
Introduce parameter should check if the element which is introduced as default parameter value is accessible anywhere the method is called.

Example:
1) have a code:
public class NewClass {
    private int f = 1;
    public void m() {
        int v = f;
    }
}
and second class

public class User {
    public static void main(String[] args) {
        new NewClass().m();
    }
}

2) select 'f' in the int v=f; line
3) introduce parameter (keep defaults)

-> the second class contains:
 new NewClass().m(f);

but f is not accessible here


Product Version: NetBeans IDE 8.0 Beta (Build 201401100215)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b49
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b107
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\8.0beta
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\8.0beta
Comment 1 Martin Balin 2016-07-07 07:16:14 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