GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java: Autoformat. · github/codeql@629c19e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • java/ql
    • src
      • Performance
        • ConcatenationInLoops.ql
      • semmle/code/java
        • Expr.qll
        • Member.qll
        • controlflow/internal
          • Preconditions.qll
        • dataflow
          • TaintTracking.qll
          • internal
            • TaintTrackingUtil.qll
            • tainttracking1
              • TaintTrackingImpl.qll
            • tainttracking2
              • TaintTrackingImpl.qll
        • dispatch
          • ObjFlow.qll
    • test/library-tests/frameworks
      • android/manifest
        • manifest.ql
      • guice
        • flow.ql
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎java/ql/src/Performance/ConcatenationInLoops.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Performance/ConcatenationInLoops.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,7 @@ predicate declaredInLoop(LocalVariableDecl v, LoopStmt loop) {
5757
from Assignment a, Variable v
5858
where
5959
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+
)
6163
select a, "The string " + v.getName() + " is built-up in a loop: use string buffer."
Collapse file

‎java/ql/src/semmle/code/java/Expr.qll‎

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 numberDiff line numberDiff line change
@@ -1117,9 +1117,7 @@ class SwitchExpr extends Expr, @switchexpr {
11171117
Expr getAResult() {
11181118
result = getACase().getRuleExpression()
11191119
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())
11231121
}
11241122

11251123
/** Gets a printable representation of this expression. */
Collapse file

‎java/ql/src/semmle/code/java/Member.qll‎

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 numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ class Callable extends StmtParent, Member, @callable {
120120
*
121121
* This includes both static call targets and dynamic dispatch targets.
122122
*/
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) }
126124

127125
/**
128126
* Holds if `c` is a viable implementation of a callable called by this
Collapse file

‎java/ql/src/semmle/code/java/controlflow/internal/Preconditions.qll‎

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 numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* `com.google.common.base.Preconditions` and
44
* `org.apache.commons.lang3.Validate`.
55
*/
6+
67
import java
78

89
/**
Collapse file

‎java/ql/src/semmle/code/java/dataflow/TaintTracking.qll‎

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 numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* Provides classes for performing local (intra-procedural) and
33
* global (inter-procedural) taint-tracking analyses.
44
*/
5+
56
import semmle.code.java.dataflow.DataFlow
67
import semmle.code.java.dataflow.DataFlow2
7-
88
import semmle.code.java.dataflow.internal.TaintTrackingUtil::StringBuilderVarModule
99

1010
module TaintTracking {
@@ -14,6 +14,5 @@ module TaintTracking {
1414
/**
1515
* DEPRECATED: Use TaintTracking2::Configuration instead.
1616
*/
17-
deprecated
18-
class Configuration2 = TaintTracking2::Configuration;
17+
deprecated class Configuration2 = TaintTracking2::Configuration;
1918
}
Collapse file

‎java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll‎

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 numberDiff line numberDiff line change
@@ -252,9 +252,7 @@ private predicate taintPreservingQualifierToMethod(Method m) {
252252
m.getName() = "trim"
253253
)
254254
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
258256
(
259257
m.getName().matches("to%String") or
260258
m.getName() = "toByteArray" or
@@ -555,8 +553,8 @@ class ObjectOutputStreamVar extends LocalVariableDecl {
555553
result.getMethod().hasName("writeObject")
556554
}
557555
}
558-
559556
private import StringBuilderVarModule
557+
560558
module StringBuilderVarModule {
561559
/**
562560
* A local variable that is initialized to a `StringBuilder`
Collapse file

‎java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll‎

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 numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration {
8585
super.hasFlow(source, sink)
8686
}
8787
}
88-
Collapse file

‎java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll‎

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 numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ abstract class Configuration extends DataFlow::Configuration {
8585
super.hasFlow(source, sink)
8686
}
8787
}
88-
Collapse file

‎java/ql/src/semmle/code/java/dispatch/ObjFlow.qll‎

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 numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* The set of dispatch targets for `Object.toString()` calls are reduced based
77
* on possible data flow from objects of more specific types to the qualifier.
88
*/
9+
910
import java
1011
private import VirtualDispatch
1112
private import semmle.code.java.controlflow.Guards
Collapse file

‎java/ql/test/library-tests/frameworks/android/manifest/manifest.ql‎

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 numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ import java
22
import semmle.code.xml.AndroidManifest
33

44
from AndroidActivityXmlElement e
5-
select e.getResolvedComponentName(), e.getAnIntentFilterElement().getAnActionElement().getActionName()
5+
select e.getResolvedComponentName(),
6+
e.getAnIntentFilterElement().getAnActionElement().getActionName()

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.