We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 042f230 commit 3a30e2aCopy full SHA for 3a30e2a
java/ql/lib/semmle/code/java/dataflow/NullGuards.qll
@@ -105,6 +105,13 @@ Expr clearlyNotNullExpr(Expr reason) {
105
result = v.getARead() and
106
not result = baseNotNullExpr()
107
)
108
+ or
109
+ exists(Field f |
110
+ result = f.getAnAccess() and
111
+ f.isFinal() and
112
+ f.getInitializer() = clearlyNotNullExpr(reason) and
113
+ not result = baseNotNullExpr()
114
+ )
115
}
116
117
/** Holds if `v` is an SSA variable that is provably not `null`. */
0 commit comments