Skip to content

Commit

Permalink
Remove BuilderEntry record
Browse files Browse the repository at this point in the history
Remove this record.

JIRA: LIGHTY-252
Signed-off-by: tobias.pobocik <[email protected]>
  • Loading branch information
Tobianas committed Sep 13, 2023
1 parent 8cacdfc commit 58686bb
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ private NormalizedMetadata leafMetadata(YangInstanceIdentifier path, final Effec
final Deque<ImmutableNormalizedMetadata.Builder> builders = new ArrayDeque<>(args.size());

// Step one: open builders
for (PathArgument arg : args) {
builders.push(new BuilderEntry(arg, ImmutableNormalizedMetadata.builder()).builder());
}
builders.push(ImmutableNormalizedMetadata.builder());

// Step two: set the top builder's metadata
Optional.ofNullable(builders.peek())
Expand Down Expand Up @@ -278,11 +276,4 @@ private ChoiceNode getFilterSpecChoiceNode(final YangInstanceIdentifier filterYI
.withChild(subtreeFilter)
.build();
}

private record BuilderEntry(PathArgument identifier, ImmutableNormalizedMetadata.Builder builder) {
BuilderEntry {
requireNonNull(identifier);
requireNonNull(builder);
}
}
}

0 comments on commit 58686bb

Please sign in to comment.