Skip to content

Commit 9785aac

Browse files
committed
Update java data flow docs: update use of deprecated class
1 parent 4f2d7ad commit 9785aac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-java.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ This query finds calls to formatting functions where the format string is not ha
145145
import semmle.code.java.dataflow.DataFlow
146146
import semmle.code.java.StringFormat
147147
148-
from StringFormatMethod format, MethodAccess call, Expr formatString
148+
from StringFormatMethod format, MethodCall call, Expr formatString
149149
where
150150
call.getMethod() = format and
151151
call.getArgument(format.getFormatStringIndex()) = formatString and
@@ -313,7 +313,7 @@ Exercise 3
313313
314314
import java
315315
316-
class GetenvSource extends MethodAccess {
316+
class GetenvSource extends MethodCall {
317317
GetenvSource() {
318318
exists(Method m | m = this.getMethod() |
319319
m.hasName("getenv") and
@@ -331,7 +331,7 @@ Exercise 4
331331
332332
class GetenvSource extends DataFlow::ExprNode {
333333
GetenvSource() {
334-
exists(Method m | m = this.asExpr().(MethodAccess).getMethod() |
334+
exists(Method m | m = this.asExpr().(MethodCall).getMethod() |
335335
m.hasName("getenv") and
336336
m.getDeclaringType() instanceof TypeSystem
337337
)

0 commit comments

Comments
 (0)