Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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,414 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.