BUG-865: Remove deprecated methods in yang.model.util
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / Leafref.java
index 65fd92458f72564de1f9fd084490854fc4c50498..16c45d01ba050eff06ab192789eae971cb59844b 100644 (file)
@@ -7,9 +7,9 @@
  */
 package org.opendaylight.yangtools.yang.model.util;
 
+import com.google.common.base.Preconditions;
 import java.util.Collections;
 import java.util.List;
-
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -17,8 +17,6 @@ import org.opendaylight.yangtools.yang.model.api.Status;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition;
 
-import com.google.common.base.Preconditions;
-
 /**
  * The <code>default</code> implementation of Instance Leafref Type Definition
  * interface.
@@ -27,7 +25,7 @@ import com.google.common.base.Preconditions;
  */
 public final class Leafref implements LeafrefTypeDefinition {
     private static final QName NAME = BaseTypes.constructQName("leafref");
-    private static final SchemaPath PATH = BaseTypes.schemaPath(NAME);
+    private static final SchemaPath PATH = SchemaPath.create(true, NAME);
     private static final String DESCRIPTION = "The leafref type is used to reference a particular leaf instance in the data tree.";
     private static final String REF = "https://tools.ietf.org/html/rfc6020#section-9.9";
 
@@ -36,8 +34,7 @@ public final class Leafref implements LeafrefTypeDefinition {
 
     @Deprecated
     public Leafref(final RevisionAwareXPath xpath) {
-        this(PATH,xpath);
-
+        this(PATH, xpath);
     }
 
     private Leafref(final SchemaPath path, final RevisionAwareXPath target) {
@@ -45,7 +42,7 @@ public final class Leafref implements LeafrefTypeDefinition {
         this.xpath = Preconditions.checkNotNull(target,"target must not be null.");
     }
 
-    public static Leafref create(final SchemaPath path,final RevisionAwareXPath target) {
+    public static Leafref create(final SchemaPath path, final RevisionAwareXPath target) {
         return new Leafref(path,target);
     }