public final class LeafRefUtils {
private LeafRefUtils() {
- throw new UnsupportedOperationException();
+ // Hidden on purpose
}
/**
DataNodeContainer currenDataNodeContainer = module;
while (nodePathIterator.hasNext()) {
final QName qname = nodePathIterator.next();
- final DataSchemaNode child = currenDataNodeContainer.getDataChildByName(qname);
+ final DataSchemaNode child = currenDataNodeContainer.dataChildByName(qname);
if (child instanceof DataNodeContainer) {
if (!(child instanceof CaseSchemaNode)) {
currenDataNodeContainer = (DataNodeContainer) child;
} else if (child instanceof ChoiceSchemaNode) {
if (nodePathIterator.hasNext()) {
- currenDataNodeContainer = ((ChoiceSchemaNode) child).getCases().get(nodePathIterator.next());
+ currenDataNodeContainer = ((ChoiceSchemaNode) child).findCase(nodePathIterator.next()).orElse(null);
} else {
break;
}