Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Local Development Environments Advanced Tooling Refactoring

Refactoring- Type Migration

Hi, i need your help good people. I am working on windows platform. i am trying to follow the refactoring challenge as was done by Craig, unfortunately my system refuses from the start, as i try to do the type migration i get the following should i say notice, hence cant do any refactor.

it says : 'java.util.Queue' is an invalid Type.

this occurs when i try to retype Song to SongRequest.

Stuck

2 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Hmmm...Smart I'm sorry but I don't quite follow.

Are you talking when you attempt to change it from a Queue<Song>, Queue<SongRequest>. Did you make a SongRequest class?

No I didn't make a SongRequest class. Am I not working on the KaraokeMachine class?? Such that I do the type migration from Song to SongRequest?? Well I guess me missing the steps that's why me lost. May you bring me to the light.

Thanx Craig, I managed now. I was missing the SongRequest class. I am glad I managed now

Thanx Craig, I managed now. I was missing the SongRequest class. I am glad I managed now

Seth Kroger
Seth Kroger
56,407 Points

If all you're doing is changing the name of a class (or anything else) then you should use the Rename refactor, not Type Migration.

Me changing a type field, for example Its like

private Queue<Song> mSongQueue ; I need to change Song to Song Request then the renaming I would do for the mSongQueue to mSongQueueRequest.

Do know if Iam clear.