Store XPath rather than BaseXPath 36/71536/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 28 Apr 2018 09:57:05 +0000 (11:57 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 28 Apr 2018 09:58:48 +0000 (11:58 +0200)
JaxenXPath should not really care how the XPath is implemented,
hence store just the interface. We still need BaseXPath for now.

Change-Id: I2a73cd51a02c0d99d9adf37801bccc83edce523c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-jaxen/src/main/java/org/opendaylight/yangtools/yang/data/jaxen/JaxenXPath.java

index f4a7a15d24467c74463067edd3a300451f8a2f4d..df2c4f49b5ad0056cb915fe6d2194833c3e7166a 100644 (file)
@@ -21,6 +21,7 @@ import javax.xml.xpath.XPathExpressionException;
 import org.jaxen.BaseXPath;
 import org.jaxen.ContextSupport;
 import org.jaxen.JaxenException;
+import org.jaxen.XPath;
 import org.jaxen.expr.Expr;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -40,10 +41,10 @@ final class JaxenXPath implements XPathExpression {
 
     private final Converter<String, QNameModule> converter;
     private final SchemaPath schemaPath;
-    private final BaseXPath xpath;
+    private final XPath xpath;
 
     private JaxenXPath(final Converter<String, QNameModule> converter, final SchemaPath schemaPath,
-            final BaseXPath xpath) {
+            final XPath xpath) {
         this.converter = requireNonNull(converter);
         this.schemaPath = requireNonNull(schemaPath);
         this.xpath = requireNonNull(xpath);