Hi all, For e.g I have a java file with following imports.
Scenario 1 import java.io.*; import java.util.*; import java.util.zip.*; Scenario 2 import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Dictionary; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; In scenario 1 we have put * and match the imports in a bad way and in Scenario 2 you define the exact imports. I know that the Scenario 2 is the ideal. But in default Intellij IDEA, if we are importing more than 5 imports it automatically put the java.io.* (This can be changed by Settings > Code Style > Java > imports tab Setting the "class count to use import with *" to some higher value) My questions are, What is the best way to optimize imports in above scenario? Do we have a best practice for "class count to use import with *" in a java file in WSO2? Does the import order matter? Highly appreciate your thoughts on this. Regards, Aruna -- *Aruna Sujith Karunarathna* | Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 9040362 | Work: +94 112145345 Email: [email protected] | Web: www.wso2.com
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
