Skip to content

Commit a37b98c

Browse files
smowtonaschackmull
andauthored
Value-preserving methods: handle generics in DataFlowUtil.qll
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent ca86925 commit a37b98c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

java/ql/src/semmle/code/java/dataflow/FlowSteps.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ private class StandardLibraryValuePreservingCallable extends ValuePreservingCall
6464
)
6565
or
6666
this.getDeclaringType()
67-
.getSourceDeclaration()
6867
.getASourceSupertype*()
6968
.hasQualifiedName("java.util", "Stack") and
7069
this.hasName("push") and

java/ql/src/semmle/code/java/dataflow/internal/DataFlowUtil.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ predicate simpleLocalFlowStep(Node node1, Node node2) {
410410
summaryStep(node1, node2, "value")
411411
or
412412
exists(MethodAccess ma, ValuePreservingCallable c, int argNo |
413-
ma.getCallee() = c and c.returnsValue(argNo)
413+
ma.getCallee().getSourceDeclaration() = c and c.returnsValue(argNo)
414414
|
415415
node2.asExpr() = ma and
416416
(

0 commit comments

Comments
 (0)