Default imports from sun instead of java package in intelliJ

I had an issue like this with java.util.Arrays not showing up in completion lists. Turns out I had somehow added it to the import and completion exclusion list. My finger must have slipped in a quick action popup at some point.

Maybe the same thing happened to you. Open your Settings dialog and find your way here:

Settings > Editor > General > Auto Import

Then, look for this list of Excluded imports:

Exclude from Import and Completion

See if java.util.List shows up in that list, and if so, remove it.

With java.util.List excluded, com.sun.tools.javac.util.List might be the only other List type in your class path. If you have the "Add unambiguous imports on the fly" option enabled, IntelliJ would then import the sun class without even asking.