Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cfdb10

Browse files
Java: Improve QLDoc & simplify code
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent 5c1e746 commit 4cfdb10

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ private class FlagType extends Type {
9797
FlagType() {
9898
this instanceof TypeString
9999
or
100-
exists(BoxedType boxedBoolean | boxedBoolean.getPrimitiveType().hasName("boolean") |
101-
this = boxedBoolean or this = boxedBoolean.getPrimitiveType()
102-
)
100+
this instanceof BooleanType
103101
}
104102
}
105103

java/ql/src/semmle/code/java/security/Encryption.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class SSLContext extends RefType {
2929
SSLContext() { hasQualifiedName("javax.net.ssl", "SSLContext") }
3030
}
3131

32-
/** Models the `javax.net.ssl.SSLSession` class. */
32+
/** The `javax.net.ssl.SSLSession` class. */
3333
class SSLSession extends RefType {
3434
SSLSession() { hasQualifiedName("javax.net.ssl", "SSLSession") }
3535
}
@@ -38,7 +38,7 @@ class HostnameVerifier extends RefType {
3838
HostnameVerifier() { hasQualifiedName("javax.net.ssl", "HostnameVerifier") }
3939
}
4040

41-
/** Models the `verify` method of the class `javax.net.ssl.HostnameVerifier`. */
41+
/** The `verify` method of the class `javax.net.ssl.HostnameVerifier`. */
4242
class HostnameVerifierVerify extends Method {
4343
HostnameVerifierVerify() {
4444
hasName("verify") and
@@ -83,7 +83,7 @@ class SetHostnameVerifierMethod extends Method {
8383
}
8484
}
8585

86-
/** Models the `setDefaultHostnameVerifier` method of the class `javax.net.ssl.HttpsURLConnection`. */
86+
/** The `setDefaultHostnameVerifier` method of the class `javax.net.ssl.HttpsURLConnection`. */
8787
class SetDefaultHostnameVerifierMethod extends Method {
8888
SetDefaultHostnameVerifierMethod() {
8989
hasName("setDefaultHostnameVerifier") and

0 commit comments

Comments
 (0)