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 220444

Summary: Quick fix for attempted reference to an inaccessible private member
Product: java Reporter: exolon
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows Vista   
Issue Type: ENHANCEMENT Exception Reporter:

Description exolon 2012-10-19 18:00:52 UTC
class A {
    private static String a() { return ""; }
}

class B {
    void b() { A.a(); }
}


In this example, the attempted call to A.a() produces an error because B doesn't have access to A's private members.

However, when the programmer discovers that they want to make such a call, it would be helpful to have a quick fix/refactoring option which changes A.a's access specifier to public (or perhaps protected, if A and B are in the same package).