[workspace model] simplify code (IDEA-CR-70186)

GitOrigin-RevId: 0a6e1a38ba7e2e3254f12c5ae6b5aa61ab363f78
This commit is contained in:
Nikolay Chashnikov
2021-01-20 21:46:53 +03:00
committed by intellij-monorepo-bot
parent 61fe60e414
commit 4101236efd

View File

@@ -331,7 +331,7 @@ class JpsProjectSerializersImpl(directorySerializersFactories: List<JpsDirectory
//entities added via JPS and imported entities stored in internal storage must be passed to serializers together, otherwise incomplete data will be stored
val entitiesToSave = storage.entitiesBySource { source ->
source in affectedSources
|| sourcesStoredInternally[source]?.let { it in affectedSources } == true
|| source in sourcesStoredInternally
|| source is JpsImportedEntitySource && !source.storedExternally && source.internalFile in affectedSources
}
val internalSourceConvertedToImported = affectedSources.filterIsInstance<JpsImportedEntitySource>().mapTo(HashSet()) {