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 ?
有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top