Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Build Identifier: I20090611-1540 If the Method to be inlined accesses private features of the declaring class and is invoked in another class, the inlined code causes visibility errors. Reproducible: Always Steps to Reproduce: 1. Create the following classes: public class ReferencingType { DeclaringType d = new DeclaringType(); public void n() { d.m(); } } public class DeclaringType { private String privateField; public void m(){ System.out.println(privateField); privateMethod(); } private void privateMethod(){ } } 2. Perform an inline method refactoring on DeclaringType.m() and inline all invocations. 3. The resulting code for the ReferencingType class: public class ReferencingType { DeclaringType d = new DeclaringType(); public void n() { System.out.println(d.privateField); d.privateMethod(); } } The following statements contain private field/method accesses that didn't produce an error in the RefactoringStatus but produce compile errors after the transformation. System.out.println(d.privateField); d.privateMethod();
*** Bug 434745 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still broken in 4.11.