[jps] npe fix FL-15722

GitOrigin-RevId: 6a8caad5e607c0219d76e4c344a4616c5202ed6f
This commit is contained in:
Vladislav.Soroka
2023-01-16 12:25:37 +04:00
committed by intellij-monorepo-bot
parent 5bfa5c79ab
commit a17a77d5f2

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.jps.incremental;
import com.google.common.collect.Lists;
@@ -1034,8 +1034,10 @@ public final class IncProjectBuilder {
BitSet transitiveDependants = new BitSet();
for (BuildChunkTask directDependant : directDependants) {
BitSet dependantChunkTransitiveDependants = chunkToTransitive.get(directDependant);
transitiveDependants.or(dependantChunkTransitiveDependants);
transitiveDependants.set(directDependant.myIndex);
if (dependantChunkTransitiveDependants != null) {
transitiveDependants.or(dependantChunkTransitiveDependants);
transitiveDependants.set(directDependant.myIndex);
}
}
chunkToTransitive.put(task, transitiveDependants);
task.myDepsScore = transitiveDependants.cardinality();