Question

Okay so I have this variable declaration

 private List<String> params;

and I wanted to change the type of params to :

private Collection<String> params;

I choose Refactor-->Type Migration (the combination of Ctrl+Shift+F6) from the context menu but nothing happens.

My questions are :

  1. What is the purpose of type migration then ?
  2. How am I going to achieve what I need to achieve most efficiently ?
Was it helpful?

Solution

That's the way it works but the text cursor needs to be inside List<String> and NOT in the name of the reference params since you want to refactor the type and not the reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top