Pattern: Import from Sun package
Issue: -
This rule rejects all sun.*
packages since they are internal APIs: they are subject to change in a undocumented or unsupported way and they are bound to a specific JRE/JDK (Sun in this case), limiting portability of your programs.
Try to avoid uses of such APIs, always prefer a public documented and specified class.
Example of violations:
import sun.misc.foo
import sun.misc.foo as Foo
public class SomeClass{}