mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Remove unused imports; use set literals in hasName
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import semmle.code.java.dataflow.FlowSources
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
import semmle.code.java.security.XmlParsers
|
||||
|
||||
/**
|
||||
* An abstract type representing a call to interpret XPath expressions.
|
||||
@@ -18,9 +17,7 @@ class XPath extends RefType {
|
||||
class XPathEvaluateOrCompile extends XPathSink {
|
||||
XPathEvaluateOrCompile() {
|
||||
exists(Method m | this.getMethod() = m and m.getDeclaringType() instanceof XPath |
|
||||
m.hasName("evaluate")
|
||||
or
|
||||
m.hasName("compile")
|
||||
m.hasName(["evaluate", "compile"])
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,7 +33,7 @@ class Dom4JNode extends RefType {
|
||||
class NodeSelectNodes extends XPathSink {
|
||||
NodeSelectNodes() {
|
||||
exists(Method m | this.getMethod() = m and m.getDeclaringType() instanceof Dom4JNode |
|
||||
m.hasName("selectNodes") or m.hasName("selectSingleNode")
|
||||
m.hasName(["selectNodes", "selectSingleNode"])
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import javax.xml.*;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
Reference in New Issue
Block a user