Skip to content

Commit 4fb67ce

Browse files
Aayush MainiCopilot
andcommitted
Remove redundant Distinct() after Union() in ContainerLayerIds merge
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e60fbf1 commit 4fb67ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Microsoft.ComponentDetection.Common/DependencyGraph/ComponentRecorder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private static void MergeComponentMetadata(DetectedComponent source, DetectedCom
100100
{
101101
if (target.ContainerLayerIds.TryGetValue(kvp.Key, out var existingLayers))
102102
{
103-
target.ContainerLayerIds[kvp.Key] = existingLayers.Union(kvp.Value).Distinct().ToList();
103+
target.ContainerLayerIds[kvp.Key] = existingLayers.Union(kvp.Value).ToList();
104104
}
105105
else
106106
{

0 commit comments

Comments
 (0)