问题
For some unknown reason, in every class where I have methods that return String type or accept String as a parameter, intellij is automatically importing:
import com.sun.org.apache.xpath.internal.operations.String;
Instead of
java.lang.String
Is this a known Bug or is there a way to disable this?
回答1:
You can exclude classes from import and completion under File | Settings | Editor | General | Auto Import
. Check if java.lang.String
is not added there by accident. And you can add com.sun.org.apache.xpath.internal.operations.String
there to prevent it from being added to imports automatically.
来源:https://stackoverflow.com/questions/41379178/intellij-2016-3-2-keeps-changing-string-import-to-com-sun-org-apache-xpath-inter