Cleanup (formatting; warnings)

This commit is contained in:
Roman Shevchenko
2015-09-14 13:02:10 +03:00
parent 1f8af3a5e0
commit 3d5da846db
@@ -171,11 +171,10 @@ public class ClassPath {
}
return result;
}
/**
* Used in
* @see com.intellij.openapi.projectRoots.JdkUtil#isClassPathJarEnabled(java.util.List, java.lang.String)
* as condition that UrlClassLoader supports classpath jars. Please modify it accordingly
* Used in com.intellij.openapi.projectRoots.JdkUtil#isClassPathJarEnabled(List, String)
* as a condition that UrlClassLoader supports classpath jars. Please modify it accordingly.
*/
private void initLoaders(final URL url, boolean lastOne, int index) throws IOException {
String path;
@@ -375,14 +374,14 @@ public class ClassPath {
}
if (ourOrder == null) {
final File orderFile = new File(PathManager.getBinPath() + File.separator + "order.txt");
final File orderFile = new File(PathManager.getBinPath(), "order.txt");
try {
if (!FileUtil.ensureCanCreateFile(orderFile)) return;
ourOrder = new PrintStream(new FileOutputStream(orderFile, true));
ShutDownTracker.getInstance().registerShutdownTask(new Runnable() {
@Override
public void run() {
ourOrder.close();
System.out.println(ourOrderSize);
closeOrderStream();
}
});
}
@@ -402,6 +401,11 @@ public class ClassPath {
}
}
@SuppressWarnings("UseOfSystemOutOrSystemErr")
private static synchronized void closeOrderStream() {
ourOrder.close();
System.out.println(ourOrderSize);
}
private static final boolean ourLogTiming = Boolean.getBoolean("idea.print.classpath.timing");
private static long ourTotalTime = 0;
@@ -425,7 +429,7 @@ public class ClassPath {
System.out.println(path.toString() + ", requests:" + ourTotalRequests + ", time:" + (ourTotalTime / 1000000) + "ms");
}
}
public static String[] loadManifestClasspath(File file) {
try {
JarInputStream inputStream = new JarInputStream(new FileInputStream(file));
@@ -445,5 +449,4 @@ public class ClassPath {
catch (Exception ignore) { }
return null;
}
}