Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334178

Summary: [pull up] Forced to make private fields public when pulling method to interface
Product: [Eclipse Project] JDT Reporter: generateui <rtimon>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: minor    
Priority: P3 CC: deepakazad, Olivier_Thomann, pwebster, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:

Description generateui CLA 2011-01-12 17:37:29 EST
Build Identifier: M20100211-1343

Prerequisites: have a class implement an interface. Try to pull up a method in the class to the implemented interface.
Eclipse will then mark all fields used in the method as public when they are marked private. This will not happen when fields are marked protected.


Reproducible: Always

Steps to Reproduce:
1.Right click method
2. Refactor
3. Pull Up
4. Select interface to pull to
5. Execute
6. Notice warning ("Eclipse needs to mark fields as public")
7. Notice former private fields are now public.
Comment 1 Olivier Thomann CLA 2011-01-12 20:36:15 EST
Moving to JDT/UI
Comment 2 Deepak Azad CLA 2011-01-13 00:17:52 EST
I cannot reproduce this. Please provide a code snippet to reproduce the problem.
Comment 3 Deepak Azad CLA 2011-01-17 22:07:47 EST
Please reopen if you have a test case.