Skip to content

Commit 7baf244

Browse files
author
Alvaro Muñoz
committed
remove test predicate
1 parent 8cd85a5 commit 7baf244

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

java/ql/lib/semmle/code/java/frameworks/google/GsonSerializability.qll

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ private class ExplicitlyReadGsonDeserializableType extends GsonDeserializableTyp
3939
}
4040
}
4141

42-
predicate test(MethodAccess ma) {
43-
ma.getMethod() instanceof GsonReadValueMethod
44-
}
45-
4642
/** A type used in a `GsonDeserializableField` declaration. */
4743
private class FieldReferencedGsonDeserializableType extends GsonDeserializableType {
4844
FieldReferencedGsonDeserializableType() {
@@ -56,7 +52,7 @@ class GsonDeserializableField extends DeserializableField {
5652
GsonDeserializableField() {
5753
exists(GsonDeserializableType superType |
5854
superType = this.getDeclaringType().getAnAncestor() and
59-
not superType instanceof TypeObject and
55+
not superType instanceof TypeObject and
6056
// TODO: if we have the source, can we just track the flow through the backing fields?
6157
//superType.fromSource()
6258
not superType.(RefType).getPackage().getName().matches("java%")
@@ -65,7 +61,5 @@ class GsonDeserializableField extends DeserializableField {
6561
}
6662

6763
private class GsonInheritTaint extends DataFlow::FieldContent, TaintInheritingContent {
68-
GsonInheritTaint() {
69-
this.getField() instanceof GsonDeserializableField
70-
}
64+
GsonInheritTaint() { this.getField() instanceof GsonDeserializableField }
7165
}

0 commit comments

Comments
 (0)