mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
-1
@@ -301,7 +301,6 @@ public class DirectoryBasedStorage implements StateStorage, Disposable {
|
||||
filesToSave.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+4
-2
@@ -57,11 +57,12 @@ import java.util.Set;
|
||||
* @author mike
|
||||
*/
|
||||
public class StorageUtil {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.components.impl.stores.StorageUtil");
|
||||
private static final Logger LOG = Logger.getInstance(StorageUtil.class);
|
||||
|
||||
private static final boolean DUMP_COMPONENT_STATES = SystemProperties.getBooleanProperty("idea.log.externally.changed.component.states", false);
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
private static final SimpleDateFormat LOG_DIR_FORMAT = new SimpleDateFormat("yyyyMMdd-HHmmss");
|
||||
private static final Pair<byte[], String> NON_EXISTENT_FILE_DATA = Pair.create(null, SystemProperties.getLineSeparator());
|
||||
|
||||
private StorageUtil() { }
|
||||
|
||||
@@ -182,9 +183,10 @@ public class StorageUtil {
|
||||
/**
|
||||
* @return pair.first - file contents (null if file does not exist), pair.second - file line separators
|
||||
*/
|
||||
@NotNull
|
||||
private static Pair<byte[], String> loadFile(@Nullable final VirtualFile file) throws IOException {
|
||||
if (file == null || !file.exists()) {
|
||||
return Pair.create(null, SystemProperties.getLineSeparator());
|
||||
return NON_EXISTENT_FILE_DATA;
|
||||
}
|
||||
|
||||
byte[] bytes = file.contentsToByteArray();
|
||||
|
||||
Reference in New Issue
Block a user