- private static final InMemoryDataTreeFactory INSTANCE = new InMemoryDataTreeFactory();
- private static final NormalizedNode<?, ?> ROOT_CONTAINER = ImmutableNodes.containerNode(SchemaContext.NAME);
-
- private InMemoryDataTreeFactory() {
- // Never instantiated externally
- }
-
- @Deprecated
- @Override
- public TipProducingDataTree create(final TreeType treeType) {
- return create(DataTreeConfiguration.getDefault(treeType));
- }
-
- @Deprecated
- @Override
- public TipProducingDataTree create(final TreeType treeType, final YangInstanceIdentifier rootPath) {
- if (rootPath.isEmpty()) {
- return create(treeType);
- }
-
- final DataTreeConfiguration defConfig = DataTreeConfiguration.getDefault(treeType);
- final DataTreeConfiguration config;
- if (!rootPath.isEmpty()) {
- config = new Builder(treeType).setMandatoryNodesValidation(defConfig.isMandatoryNodesValidationEnabled())
- .setRootPath(rootPath).setUniqueIndexes(defConfig.isUniqueIndexEnabled()).build();
- } else {
- config = defConfig;
- }
-
- return new InMemoryDataTree(TreeNodeFactory.createTreeNode(createRoot(rootPath), Version.initial()), config,
- null);
- }
+ private static final Logger LOG = LoggerFactory.getLogger(InMemoryDataTreeFactory.class);
+ // FIXME: YANGTOOLS-1074: we do not want this name
+ private static final @NonNull NormalizedNode<?, ?> ROOT_CONTAINER =
+ ImmutableNodes.containerNode(SchemaContext.NAME);