mirror of
https://github.com/github/codeql.git
synced 2026-02-28 21:03:50 +01:00
Java: Autoformat.
This commit is contained in:
@@ -1117,9 +1117,7 @@ class SwitchExpr extends Expr, @switchexpr {
|
||||
Expr getAResult() {
|
||||
result = getACase().getRuleExpression()
|
||||
or
|
||||
exists(BreakStmt break |
|
||||
break.(JumpStmt).getTarget() = this and result = break.getValue()
|
||||
)
|
||||
exists(BreakStmt break | break.(JumpStmt).getTarget() = this and result = break.getValue())
|
||||
}
|
||||
|
||||
/** Gets a printable representation of this expression. */
|
||||
|
||||
@@ -120,9 +120,7 @@ class Callable extends StmtParent, Member, @callable {
|
||||
*
|
||||
* This includes both static call targets and dynamic dispatch targets.
|
||||
*/
|
||||
predicate polyCalls(Callable m) {
|
||||
this.calls(m) or this.callsImpl(m)
|
||||
}
|
||||
predicate polyCalls(Callable m) { this.calls(m) or this.callsImpl(m) }
|
||||
|
||||
/**
|
||||
* Holds if `c` is a viable implementation of a callable called by this
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* `com.google.common.base.Preconditions` and
|
||||
* `org.apache.commons.lang3.Validate`.
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* Provides classes for performing local (intra-procedural) and
|
||||
* global (inter-procedural) taint-tracking analyses.
|
||||
*/
|
||||
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import semmle.code.java.dataflow.DataFlow2
|
||||
|
||||
import semmle.code.java.dataflow.internal.TaintTrackingUtil::StringBuilderVarModule
|
||||
|
||||
module TaintTracking {
|
||||
@@ -14,6 +14,5 @@ module TaintTracking {
|
||||
/**
|
||||
* DEPRECATED: Use TaintTracking2::Configuration instead.
|
||||
*/
|
||||
deprecated
|
||||
class Configuration2 = TaintTracking2::Configuration;
|
||||
deprecated class Configuration2 = TaintTracking2::Configuration;
|
||||
}
|
||||
|
||||
@@ -252,9 +252,7 @@ private predicate taintPreservingQualifierToMethod(Method m) {
|
||||
m.getName() = "trim"
|
||||
)
|
||||
or
|
||||
exists(Class c | c.getQualifiedName() = "java.lang.Number" |
|
||||
hasSubtype*(c, m.getDeclaringType())
|
||||
) and
|
||||
exists(Class c | c.getQualifiedName() = "java.lang.Number" | hasSubtype*(c, m.getDeclaringType())) and
|
||||
(
|
||||
m.getName().matches("to%String") or
|
||||
m.getName() = "toByteArray" or
|
||||
@@ -555,8 +553,8 @@ class ObjectOutputStreamVar extends LocalVariableDecl {
|
||||
result.getMethod().hasName("writeObject")
|
||||
}
|
||||
}
|
||||
|
||||
private import StringBuilderVarModule
|
||||
|
||||
module StringBuilderVarModule {
|
||||
/**
|
||||
* A local variable that is initialized to a `StringBuilder`
|
||||
|
||||
@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration {
|
||||
super.hasFlow(source, sink)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration {
|
||||
super.hasFlow(source, sink)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* The set of dispatch targets for `Object.toString()` calls are reduced based
|
||||
* on possible data flow from objects of more specific types to the qualifier.
|
||||
*/
|
||||
|
||||
import java
|
||||
private import VirtualDispatch
|
||||
private import semmle.code.java.controlflow.Guards
|
||||
|
||||
Reference in New Issue
Block a user