문제

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