My current system(MacOS 10.10.5) configuration is :
IntelliJ IDEA 2017.2.2 #Built on 9August,2017 java version "9" Java(TM) SE Runtime Environment (build 9+181)
Every time I start working on a project(currently 1.8.0_65) and write a class using
List<String> example = new ArrayList<>();
=> If I click on the auto suggested tip for List
=> Import class
The default import statement introduced is
import com.sun.tools.javac.util.List;
while I expect it to be :
import java.util.List;
Is there any configuration that I can redress or is this some bug in the combinations I am using? Would want to know what settings has given preference to sun
package over the java
package?
Note : Have gone through the answer of Any way (or shortcut) to auto import the classes in IntelliJ IDEA like in Eclipse? but the options that I get when I type List
doesn't include the one from java.util
in my case.
Edit : The import for java.util.List
is not missing, I am able to import the same manually.