CODSTA.IMPT
Minimize * form of "import" statements
Description
This rule flags code that uses * in import statements.
We recommend that you try to "import" only necessary classes and be precise about what you are importing. Otherwise, readers might have a difficult time understanding its context and dependencies. Some people even prefer not using "import" at all (thus requiring that every class reference is fully qualified); this prevents all possible ambiguity and reduces source code changes if package names change.
Example
package CODSTA;
import java.io.*;
public class IMPT {
void method (InputStream in) {
if (in == null) return;
}
}
Reference
http://g.oswego.edu/dl/html/javaCodingStd.html
|