Java: Autoformat.

This commit is contained in:
Anders Schack-Mulligen
2019-08-21 14:38:17 +02:00
parent c2d1a52b39
commit 629c19e719
11 changed files with 14 additions and 20 deletions

View File

@@ -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. */

View File

@@ -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

View File

@@ -3,6 +3,7 @@
* `com.google.common.base.Preconditions` and
* `org.apache.commons.lang3.Validate`.
*/
import java
/**

View File

@@ -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;
}

View File

@@ -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`

View File

@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration {
super.hasFlow(source, sink)
}
}

View File

@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration {
super.hasFlow(source, sink)
}
}

View File

@@ -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