What is the use case for type migration in Intellij Idea?
-
03-07-2021 - |
سؤال
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 :
- What is the purpose of type migration then ?
- 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.
لا تنتمي إلى StackOverflow