use of org.opendaylight.yangtools.yang.data.impl.codec.DeserializationException in project controller by opendaylight.
the class AbstractForwardedDataBroker method toBinding.
protected Set<InstanceIdentifier<?>> toBinding(final InstanceIdentifier<?> path, final Set<YangInstanceIdentifier> normalized) {
final Set<InstanceIdentifier<?>> hashSet = new HashSet<>();
for (final YangInstanceIdentifier normalizedPath : normalized) {
try {
final Optional<InstanceIdentifier<? extends DataObject>> potential = getCodec().toBinding(normalizedPath);
if (potential.isPresent()) {
final InstanceIdentifier<? extends DataObject> binding = potential.get();
hashSet.add(binding);
} else if (normalizedPath.getLastPathArgument() instanceof YangInstanceIdentifier.AugmentationIdentifier) {
hashSet.add(path);
}
} catch (final DeserializationException e) {
LOG.warn("Failed to transform {}, omitting it", normalizedPath, e);
}
}
return hashSet;
}
Aggregations