Skip to content

Files

Latest commit

 

History

History
22 lines (13 loc) · 653 Bytes

ImportFromSunPackages.md

File metadata and controls

22 lines (13 loc) · 653 Bytes

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.

Description

Example of violations:

import sun.misc.foo
import sun.misc.foo as Foo

public class SomeClass{}

Further Reading