avoid constantly creating and deleting tmp directory for mappings delta when not needed

This commit is contained in:
Eugene Zhuravlev
2012-09-06 21:22:38 +02:00
parent 08d7977387
commit 936c9cec79
@@ -87,7 +87,6 @@ public class Mappings {
myInitName = myContext.get("<init>");
myEmptyName = myContext.get("");
myDebugS = base.myDebugS;
myRootDir.mkdirs();
createImplementation();
}
@@ -120,6 +119,9 @@ public class Mappings {
myClassToSourceFile = new IntIntTransientMaplet();
}
else {
if (myIsDelta) {
myRootDir.mkdirs();
}
myClassToSubclasses = new IntIntPersistentMultiMaplet(DependencyContext.getTableFile(myRootDir, CLASS_TO_SUBCLASSES), INT_KEY_DESCRIPTOR);
myClassToClassDependency = new IntIntPersistentMultiMaplet(DependencyContext.getTableFile(myRootDir, CLASS_TO_CLASS), INT_KEY_DESCRIPTOR);
mySourceFileToClasses = new IntObjectPersistentMultiMaplet<ClassRepr>(
@@ -2186,7 +2188,9 @@ public class Mappings {
}
}
else {
FileUtil.delete(myRootDir);
if (!myDeltaIsTransient) {
FileUtil.delete(myRootDir);
}
}
}
}