GeezerVison is showing github.com — Java: Autoformat. · github/codeql@629c19e
File treeExpand file treeCollapse file tree Open diff view settings test/library-tests/frameworks
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: java/ql/src/Performance/ConcatenationInLoops.ql +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -57,5 +57,7 @@ predicate declaredInLoop(LocalVariableDecl v, LoopStmt loop) { | 57 | 57 | from Assignment a, Variable v | 58 | 58 | where | 59 | 59 | useAndDef(a, v) and | 60 | | - exists(LoopStmt loop | a.getEnclosingStmt().getEnclosingStmt*() = loop | not declaredInLoop(v, loop)) | | 60 | + exists(LoopStmt loop | a.getEnclosingStmt().getEnclosingStmt*() = loop | | | 61 | + not declaredInLoop(v, loop) | | 62 | + ) | 61 | 63 | select a, "The string " + v.getName() + " is built-up in a loop: use string buffer." |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/Expr.qll +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1117,9 +1117,7 @@ class SwitchExpr extends Expr, @switchexpr { | 1117 | 1117 | Expr getAResult() { | 1118 | 1118 | result = getACase().getRuleExpression() | 1119 | 1119 | or | 1120 | | - exists(BreakStmt break | | 1121 | | - break.(JumpStmt).getTarget() = this and result = break.getValue() | 1122 | | - ) | | 1120 | + exists(BreakStmt break | break.(JumpStmt).getTarget() = this and result = break.getValue()) | 1123 | 1121 | } | 1124 | 1122 |
| 1125 | 1123 | /** Gets a printable representation of this expression. */ | |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/Member.qll +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -120,9 +120,7 @@ class Callable extends StmtParent, Member, @callable { | 120 | 120 | * | 121 | 121 | * This includes both static call targets and dynamic dispatch targets. | 122 | 122 | */ | 123 | | - predicate polyCalls(Callable m) { | 124 | | - this.calls(m) or this.callsImpl(m) | 125 | | - } | | 123 | + predicate polyCalls(Callable m) { this.calls(m) or this.callsImpl(m) } | 126 | 124 |
| 127 | 125 | /** | 128 | 126 | * Holds if `c` is a viable implementation of a callable called by this | |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/controlflow/internal/Preconditions.qll +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | * `com.google.common.base.Preconditions` and | 4 | 4 | * `org.apache.commons.lang3.Validate`. | 5 | 5 | */ | | 6 | + | 6 | 7 | import java | 7 | 8 |
| 8 | 9 | /** | |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/dataflow/TaintTracking.qll +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | * Provides classes for performing local (intra-procedural) and | 3 | 3 | * global (inter-procedural) taint-tracking analyses. | 4 | 4 | */ | | 5 | + | 5 | 6 | import semmle.code.java.dataflow.DataFlow | 6 | 7 | import semmle.code.java.dataflow.DataFlow2 | 7 | | - | 8 | 8 | import semmle.code.java.dataflow.internal.TaintTrackingUtil::StringBuilderVarModule | 9 | 9 |
| 10 | 10 | module TaintTracking { | @@ -14,6 +14,5 @@ module TaintTracking { | 14 | 14 | /** | 15 | 15 | * DEPRECATED: Use TaintTracking2::Configuration instead. | 16 | 16 | */ | 17 | | - deprecated | 18 | | - class Configuration2 = TaintTracking2::Configuration; | | 17 | + deprecated class Configuration2 = TaintTracking2::Configuration; | 19 | 18 | } |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -252,9 +252,7 @@ private predicate taintPreservingQualifierToMethod(Method m) { | 252 | 252 | m.getName() = "trim" | 253 | 253 | ) | 254 | 254 | or | 255 | | - exists(Class c | c.getQualifiedName() = "java.lang.Number" | | 256 | | - hasSubtype*(c, m.getDeclaringType()) | 257 | | - ) and | | 255 | + exists(Class c | c.getQualifiedName() = "java.lang.Number" | hasSubtype*(c, m.getDeclaringType())) and | 258 | 256 | ( | 259 | 257 | m.getName().matches("to%String") or | 260 | 258 | m.getName() = "toByteArray" or | @@ -555,8 +553,8 @@ class ObjectOutputStreamVar extends LocalVariableDecl { | 555 | 553 | result.getMethod().hasName("writeObject") | 556 | 554 | } | 557 | 555 | } | 558 | | - | 559 | 556 | private import StringBuilderVarModule | | 557 | + | 560 | 558 | module StringBuilderVarModule { | 561 | 559 | /** | 562 | 560 | * A local variable that is initialized to a `StringBuilder` | |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration { | 85 | 85 | super.hasFlow(source, sink) | 86 | 86 | } | 87 | 87 | } | 88 | | - |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration { | 85 | 85 | super.hasFlow(source, sink) | 86 | 86 | } | 87 | 87 | } | 88 | | - |
Collapse file Copy file name to clipboardExpand all lines: java/ql/src/semmle/code/java/dispatch/ObjFlow.qll +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | * The set of dispatch targets for `Object.toString()` calls are reduced based | 7 | 7 | * on possible data flow from objects of more specific types to the qualifier. | 8 | 8 | */ | | 9 | + | 9 | 10 | import java | 10 | 11 | private import VirtualDispatch | 11 | 12 | private import semmle.code.java.controlflow.Guards | |
Collapse file Copy file name to clipboardExpand all lines: java/ql/test/library-tests/frameworks/android/manifest/manifest.ql +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,4 +2,5 @@ import java | 2 | 2 | import semmle.code.xml.AndroidManifest | 3 | 3 |
| 4 | 4 | from AndroidActivityXmlElement e | 5 | | -select e.getResolvedComponentName(), e.getAnIntentFilterElement().getAnActionElement().getActionName() | | 5 | +select e.getResolvedComponentName(), | | 6 | + e.getAnIntentFilterElement().getAnActionElement().getActionName() |
|