Skip to content

Commit

Permalink
NormalizedMetadata is not Identifiable
Browse files Browse the repository at this point in the history
Implement a private record to use metadata after changes in:
opendaylight/yangtools@6371872

JIRA: LIGHTY-235
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
  • Loading branch information
Tobianas committed Sep 6, 2023
1 parent d609344 commit df5bbd0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private NormalizedMetadata leafMetadata(YangInstanceIdentifier path, final Effec

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

// Step two: set the top builder's metadata
Expand Down Expand Up @@ -277,4 +277,10 @@ 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 df5bbd0

Please sign in to comment.