The cast is valid, but let's use one which does not trigger a warning.
Change-Id: I577efc001f7b06fce0806fc1149f79116a03bdd5
Signed-off-by: Robert Varga <rovarga@cisco.com>
final Optional<NormalizedNode<?, ?>> maybeOriginatorId = NormalizedNodes.findNode(attrs, ORIGINATOR_ID);
final UnsignedInteger originatorId;
if (maybeOriginatorId.isPresent()) {
- originatorId = RouterIds.routerIdForAddress(((LeafNode<String>)maybeOriginatorId.get()).getValue());
+ originatorId = RouterIds.routerIdForAddress((String) ((LeafNode<?>)maybeOriginatorId.get()).getValue());
} else {
originatorId = routerId;
}