Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334178 - [pull up] Forced to make private fields public when pulling method to interface
Summary: [pull up] Forced to make private fields public when pulling method to interface
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 17:37 EST by generateui CLA
Modified: 2011-01-17 22:07 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.