Skip to content

Commit 1d3eb57

Browse files
hasJsonTypeInfoAnnotation() should check fields recursively
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent 83a9b0e commit 1d3eb57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/semmle/code/java/frameworks/Jackson.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private class JsonParser extends RefType {
2727
JsonParser() { hasQualifiedName("com.fasterxml.jackson.core", "JsonParser") }
2828
}
2929

30-
/** A type descriptor in Jackson libraries. */
30+
/** A type descriptor in Jackson libraries. For example, `java.lang.Class`. */
3131
class JacksonTypeDescriptorType extends RefType {
3232
JacksonTypeDescriptorType() {
3333
this instanceof TypeClass or
@@ -128,7 +128,7 @@ predicate createJacksonTreeNodeStep(DataFlow::Node fromNode, DataFlow::Node toNo
128128
*/
129129
private predicate hasJsonTypeInfoAnnotation(RefType type) {
130130
hasFieldWithJsonTypeAnnotation(type.getASupertype*()) or
131-
hasFieldWithJsonTypeAnnotation(type.getAField().getType())
131+
hasJsonTypeInfoAnnotation(type.getAField().getType())
132132
}
133133

134134
/**

0 commit comments

Comments
 (0)