Skip to content

Commit ab73d13

Browse files
committed
Small simplification
1 parent 690dd47 commit ab73d13

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test2/test.ql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ class Test extends InlineExpectationsTest {
1313
loc = node.getLocation() and
1414
el = node.toString() and
1515
value = "" and
16-
(
17-
if exists(string x | trustedDomain(x))
18-
then tag = "hasUntrustedResult"
19-
else tag = "hasNoTrustedResult"
20-
)
16+
if trustedDomain(_) then tag = "hasUntrustedResult" else tag = "hasNoTrustedResult"
2117
)
2218
}
2319
}

java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test3/test.ql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ class Test extends InlineExpectationsTest {
1313
loc = node.getLocation() and
1414
el = node.toString() and
1515
value = "" and
16-
(
17-
if exists(string x | trustedDomain(x))
18-
then tag = "hasUntrustedResult"
19-
else tag = "hasNoTrustedResult"
20-
)
16+
if trustedDomain(_) then tag = "hasUntrustedResult" else tag = "hasNoTrustedResult"
2117
)
2218
}
2319
}

java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test4/test.ql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ class Test extends InlineExpectationsTest {
1313
loc = node.getLocation() and
1414
el = node.toString() and
1515
value = "" and
16-
(
17-
if exists(string x | trustedDomain(x))
18-
then tag = "hasUntrustedResult"
19-
else tag = "hasNoTrustedResult"
20-
)
16+
if trustedDomain(_) then tag = "hasUntrustedResult" else tag = "hasNoTrustedResult"
2117
)
2218
}
2319
}

java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test5/test.ql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ class Test extends InlineExpectationsTest {
1313
loc = node.getLocation() and
1414
el = node.toString() and
1515
value = "" and
16-
(
17-
if exists(string x | trustedDomain(x))
18-
then tag = "hasUntrustedResult"
19-
else tag = "hasNoTrustedResult"
20-
)
16+
if trustedDomain(_) then tag = "hasUntrustedResult" else tag = "hasNoTrustedResult"
2117
)
2218
}
2319
}

0 commit comments

Comments
 (0)