File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
java/ql/src/semmle/code/java/frameworks/guava Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 55import java
66import StringUtils
77import Collections
8+ import Preconditions
Original file line number Diff line number Diff line change 1+ /** Definitions of flow steps through the Preconditions class in the Guava framework. */
2+
3+ import java
4+ private import semmle.code.java.dataflow.FlowSteps
5+
6+ /**
7+ * The class `com.google.common.base.Preconditions`.
8+ */
9+ class TypeGuavaPreconditions extends Class {
10+ TypeGuavaPreconditions ( ) { this .hasQualifiedName ( "com.google.common.base" , "Preconditions" ) }
11+ }
12+
13+ /**
14+ * A method that returns its argumnets.
15+ */
16+ private class GuavaPreconditionsMethod extends TaintPreservingCallable {
17+ GuavaPreconditionsMethod ( ) {
18+ this .getDeclaringType ( ) instanceof TypeGuavaPreconditions and
19+ this .hasName ( "checkNotNull" )
20+ }
21+
22+ override predicate returnsTaintFrom ( int src ) { src = 0 }
23+ }
You can’t perform that action at this time.
0 commit comments