diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexHandler.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexHandler.java index 75da9b9195..8f1437c36d 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexHandler.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexHandler.java @@ -11,7 +11,6 @@ import net.sourceforge.pmd.lang.AbstractPmdLanguageVersionHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; import net.sourceforge.pmd.lang.VisitorStarter; -import net.sourceforge.pmd.lang.XPathHandler; import net.sourceforge.pmd.lang.apex.ast.ASTMethod; import net.sourceforge.pmd.lang.apex.ast.ASTUserClassOrInterface; import net.sourceforge.pmd.lang.apex.ast.ApexNode; @@ -20,7 +19,6 @@ import net.sourceforge.pmd.lang.apex.metrics.api.ApexClassMetricKey; import net.sourceforge.pmd.lang.apex.metrics.api.ApexOperationMetricKey; import net.sourceforge.pmd.lang.apex.multifile.ApexMultifileVisitorFacade; import net.sourceforge.pmd.lang.apex.rule.ApexRuleViolationFactory; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; import net.sourceforge.pmd.lang.metrics.LanguageMetricsProvider; import net.sourceforge.pmd.lang.metrics.internal.AbstractLanguageMetricsProvider; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; @@ -35,12 +33,6 @@ public class ApexHandler extends AbstractPmdLanguageVersionHandler { return rootNode -> new ApexMultifileVisitorFacade().initializeWith((ApexNode) rootNode); } - - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - @Override public RuleViolationFactory getRuleViolationFactory() { return ApexRuleViolationFactory.INSTANCE; diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/AbstractLanguageVersionHandler.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/AbstractLanguageVersionHandler.java index 857c387c55..1e340f8540 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/AbstractLanguageVersionHandler.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/AbstractLanguageVersionHandler.java @@ -4,7 +4,6 @@ package net.sourceforge.pmd.lang; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; import net.sourceforge.pmd.lang.dfa.DFAGraphRule; import net.sourceforge.pmd.lang.metrics.LanguageMetricsProvider; @@ -21,11 +20,6 @@ public abstract class AbstractLanguageVersionHandler implements LanguageVersionH return DataFlowHandler.DUMMY; } - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - @Override public ParserOptions getDefaultParserOptions() { return new ParserOptions(); diff --git a/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/JspHandler.java b/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/JspHandler.java index 13e26b62a1..4dde455568 100644 --- a/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/JspHandler.java +++ b/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/JspHandler.java @@ -7,8 +7,6 @@ package net.sourceforge.pmd.lang.jsp; import net.sourceforge.pmd.lang.AbstractPmdLanguageVersionHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; -import net.sourceforge.pmd.lang.XPathHandler; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; /** * Implementation of LanguageVersionHandler for the JSP parser. @@ -17,12 +15,6 @@ import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; */ public class JspHandler extends AbstractPmdLanguageVersionHandler { - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - - @Override public Parser getParser(ParserOptions parserOptions) { return new JspParser(parserOptions); diff --git a/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/PLSQLHandler.java b/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/PLSQLHandler.java index 1ec0e75cc8..c14c09803a 100644 --- a/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/PLSQLHandler.java +++ b/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/PLSQLHandler.java @@ -9,9 +9,7 @@ import net.sourceforge.pmd.lang.DataFlowHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; import net.sourceforge.pmd.lang.VisitorStarter; -import net.sourceforge.pmd.lang.XPathHandler; import net.sourceforge.pmd.lang.ast.Node; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; import net.sourceforge.pmd.lang.dfa.DFAGraphRule; import net.sourceforge.pmd.lang.plsql.ast.ASTInput; import net.sourceforge.pmd.lang.plsql.dfa.DFAPLSQLGraphRule; @@ -66,11 +64,4 @@ public class PLSQLHandler extends AbstractPmdLanguageVersionHandler { }; } - /** - * Return minimal XPathHandler to cope with Jaxen XPath Rules. - */ - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } } diff --git a/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java b/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java index 7f0b548547..585e3c68ae 100644 --- a/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java +++ b/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java @@ -7,16 +7,9 @@ package net.sourceforge.pmd.lang.swift; import net.sourceforge.pmd.lang.AbstractPmdLanguageVersionHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; -import net.sourceforge.pmd.lang.XPathHandler; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; public class SwiftHandler extends AbstractPmdLanguageVersionHandler { - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - @Override public Parser getParser(final ParserOptions parserOptions) { return new SwiftParserAdapter(parserOptions); diff --git a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/VfHandler.java b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/VfHandler.java index b59699ed35..d46c19f074 100644 --- a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/VfHandler.java +++ b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/VfHandler.java @@ -7,16 +7,9 @@ package net.sourceforge.pmd.lang.vf; import net.sourceforge.pmd.lang.AbstractPmdLanguageVersionHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; -import net.sourceforge.pmd.lang.XPathHandler; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; public class VfHandler extends AbstractPmdLanguageVersionHandler { - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - @Override public Parser getParser(ParserOptions parserOptions) { return new VfParser(parserOptions); diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/VmHandler.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/VmHandler.java index 3e2e46531c..4ec4aff3fa 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/VmHandler.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/VmHandler.java @@ -7,8 +7,6 @@ package net.sourceforge.pmd.lang.vm; import net.sourceforge.pmd.lang.AbstractPmdLanguageVersionHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; -import net.sourceforge.pmd.lang.XPathHandler; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; /** * Implementation of LanguageVersionHandler for the VM parser. @@ -16,11 +14,6 @@ import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; */ public class VmHandler extends AbstractPmdLanguageVersionHandler { - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - @Override public Parser getParser(final ParserOptions parserOptions) { diff --git a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/XmlHandler.java b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/XmlHandler.java index e712e9285f..97d79e8b5d 100644 --- a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/XmlHandler.java +++ b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/XmlHandler.java @@ -7,19 +7,12 @@ package net.sourceforge.pmd.lang.xml; import net.sourceforge.pmd.lang.AbstractPmdLanguageVersionHandler; import net.sourceforge.pmd.lang.Parser; import net.sourceforge.pmd.lang.ParserOptions; -import net.sourceforge.pmd.lang.XPathHandler; -import net.sourceforge.pmd.lang.ast.xpath.DefaultASTXPathHandler; /** * Implementation of LanguageVersionHandler for the XML. */ public class XmlHandler extends AbstractPmdLanguageVersionHandler { - @Override - public XPathHandler getXPathHandler() { - return new DefaultASTXPathHandler(); - } - @Override public ParserOptions getDefaultParserOptions() { return new XmlParserOptions();