From 19988ce90b9b35481ee22b5760d4a5e53aedcd16 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 17 Nov 2016 15:14:16 +0100 Subject: SONAR-8391 Fix Quality flaws --- .../org/sonar/db/version/v60/PopulateUuidPathColumnOnProjects.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sonar-db') diff --git a/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateUuidPathColumnOnProjects.java b/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateUuidPathColumnOnProjects.java index 13efc5f4684..d497b9ebc8d 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateUuidPathColumnOnProjects.java +++ b/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateUuidPathColumnOnProjects.java @@ -118,10 +118,10 @@ public class PopulateUuidPathColumnOnProjects extends BaseDataChange { } List componentUuidPath = Arrays.stream(snapshot.snapshotPath) - .mapToObj(snapshotId -> relations.snapshotsById.get(snapshotId)) + .mapToObj(relations.snapshotsById::get) .filter(Objects::nonNull) .map(s -> s.componentUuid) - .collect(toCollection(() -> new ArrayList<>())); + .collect(toCollection(ArrayList::new)); if (componentUuidPath.size() != snapshot.snapshotPath.length) { LOG.trace("Some component UUIDs not found for snapshots [{}]", snapshot.snapshotPath); return false; -- cgit v1.2.3