summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
65fda7e)
@Override
public TipProducingDataTree create(final TreeType treeType, final YangInstanceIdentifier rootPath) {
@Override
public TipProducingDataTree create(final TreeType treeType, final YangInstanceIdentifier rootPath) {
+ if (rootPath.isEmpty()) {
+ return create(treeType);
+ }
final NormalizedNode<?, ?> root;
final PathArgument arg = rootPath.getLastPathArgument();
if (arg instanceof NodeIdentifier) {
final NormalizedNode<?, ?> root;
final PathArgument arg = rootPath.getLastPathArgument();
if (arg instanceof NodeIdentifier) {
b.withNodeIdentifier((NodeIdentifierWithPredicates) arg);
root = b.build();
} else {
b.withNodeIdentifier((NodeIdentifierWithPredicates) arg);
root = b.build();
} else {
// FIXME: implement augmentations and leaf-lists
throw new IllegalArgumentException("Unsupported root node " + arg);
}
// FIXME: implement augmentations and leaf-lists
throw new IllegalArgumentException("Unsupported root node " + arg);
}