mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ES] do not override the last successful import data which was received before ES projects data storage initialization
GitOrigin-RevId: 2a5509be5d0efa5d3dd94a65124cbda82740cecf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cb8f1f46a4
commit
50de2d894b
+7
-3
@@ -78,7 +78,6 @@ public class ExternalProjectsDataStorage implements SettingsSavingComponentJavaA
|
||||
}
|
||||
|
||||
public synchronized void load() {
|
||||
myExternalRootProjects.clear();
|
||||
long startTs = System.currentTimeMillis();
|
||||
long readEnd = startTs;
|
||||
try {
|
||||
@@ -92,9 +91,14 @@ public class ExternalProjectsDataStorage implements SettingsSavingComponentJavaA
|
||||
}
|
||||
|
||||
for (InternalExternalProjectInfo projectInfo : ContainerUtil.notNullize(projectInfos)) {
|
||||
Pair<ProjectSystemId, File> key = Pair.create(projectInfo.getProjectSystemId(), new File(projectInfo.getExternalProjectPath()));
|
||||
InternalExternalProjectInfo projectInfoReceivedBeforeStorageInitialization = myExternalRootProjects.get(key);
|
||||
if (projectInfoReceivedBeforeStorageInitialization != null && projectInfoReceivedBeforeStorageInitialization.getLastSuccessfulImportTimestamp() > 0) {
|
||||
// do not override the last successful import data which was received before this data storage initialization
|
||||
continue;
|
||||
}
|
||||
if (validate(projectInfo)) {
|
||||
myExternalRootProjects.put(
|
||||
Pair.create(projectInfo.getProjectSystemId(), new File(projectInfo.getExternalProjectPath())), projectInfo);
|
||||
myExternalRootProjects.put(key, projectInfo);
|
||||
if (projectInfo.getLastImportTimestamp() != projectInfo.getLastSuccessfulImportTimestamp()) {
|
||||
markDirty(projectInfo.getExternalProjectPath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user