diff --git a/entity-registry/src/main/java/com/linkedin/metadata/models/registry/SnapshotEntityRegistry.java b/entity-registry/src/main/java/com/linkedin/metadata/models/registry/SnapshotEntityRegistry.java index 12dc7e7c179a5a..16df2d452a619e 100644 --- a/entity-registry/src/main/java/com/linkedin/metadata/models/registry/SnapshotEntityRegistry.java +++ b/entity-registry/src/main/java/com/linkedin/metadata/models/registry/SnapshotEntityRegistry.java @@ -40,7 +40,6 @@ import javax.annotation.Nullable; import lombok.Getter; - /** * Implementation of {@link EntityRegistry} that builds {@link DefaultEntitySpec} objects from the a * {@link Snapshot} Record Template present on the classpath @@ -52,9 +51,7 @@ public class SnapshotEntityRegistry implements EntityRegistry { private final AspectTemplateEngine _aspectTemplateEngine; private final Map _aspectNameToSpec; - - @Getter - @Nullable + @Getter @Nullable private BiFunction, PluginFactory> pluginFactoryProvider; private static final SnapshotEntityRegistry INSTANCE = new SnapshotEntityRegistry(); @@ -72,9 +69,10 @@ public SnapshotEntityRegistry() { public SnapshotEntityRegistry( BiFunction, PluginFactory> pluginFactoryProvider) { - entityNameToSpec = new EntitySpecBuilder().buildEntitySpecs(new Snapshot().schema()) - .stream() - .collect(Collectors.toMap(spec -> spec.getName().toLowerCase(), spec -> spec)); + entityNameToSpec = + new EntitySpecBuilder() + .buildEntitySpecs(new Snapshot().schema()).stream() + .collect(Collectors.toMap(spec -> spec.getName().toLowerCase(), spec -> spec)); entitySpecs = new ArrayList<>(entityNameToSpec.values()); _aspectNameToSpec = populateAspectMap(entitySpecs); _aspectTemplateEngine = populateTemplateEngine(_aspectNameToSpec); diff --git a/metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/AspectsBatchImpl.java b/metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/AspectsBatchImpl.java index d57038bf1c007c..0808c29e8ea892 100644 --- a/metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/AspectsBatchImpl.java +++ b/metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/AspectsBatchImpl.java @@ -48,7 +48,7 @@ public Pair>, List> toUpsertBatchItems( final Map> latestAspects) { // Process proposals to change items - Stream mutatedProposalsStream = + Stream mutatedProposalsStream = proposedItemsToChangeItemStream( items.stream() .filter(item -> item instanceof ProposedItem) @@ -93,8 +93,9 @@ public Pair>, List> toUpsertBatchItems( LinkedList newItems = applyMCPSideEffects(upsertBatchItems).collect(Collectors.toCollection(LinkedList::new)); - Map> newUrnAspectNames = getNewUrnAspectsMap(getUrnAspectsMap(), newItems); upsertBatchItems.addAll(newItems); + Map> newUrnAspectNames = + getNewUrnAspectsMap(getUrnAspectsMap(), upsertBatchItems); return Pair.of(newUrnAspectNames, upsertBatchItems); }