mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Fix Android logging signature in java/ql/src/experimental/semmle/code/java/Logging.qll
This commit is contained in:
@@ -18,8 +18,7 @@ class LoggingCall extends MethodAccess {
|
||||
t.hasQualifiedName("org.scijava.log", "Logger") or
|
||||
t.hasQualifiedName("com.google.common.flogger", "LoggingApi") or
|
||||
t.hasQualifiedName("java.lang", "System$Logger") or
|
||||
t.hasQualifiedName("java.util.logging", "Logger") or
|
||||
t.hasQualifiedName("android.util", "Log")
|
||||
t.hasQualifiedName("java.util.logging", "Logger")
|
||||
|
|
||||
(
|
||||
m.getDeclaringType().getASourceSupertype*() = t or
|
||||
@@ -28,6 +27,23 @@ class LoggingCall extends MethodAccess {
|
||||
m.getReturnType() instanceof VoidType and
|
||||
this = m.getAReference()
|
||||
)
|
||||
or
|
||||
exists(RefType t, Method m | t.hasQualifiedName("android.util", "Log") |
|
||||
(
|
||||
m.hasName("d") or
|
||||
m.hasName("e") or
|
||||
m.hasName("i") or
|
||||
m.hasName("v") or
|
||||
m.hasName("w") or
|
||||
m.hasName("wtf")
|
||||
) and
|
||||
(
|
||||
m.getDeclaringType().getASourceSupertype*() = t or
|
||||
m.getDeclaringType().extendsOrImplements*(t)
|
||||
) and
|
||||
m.getReturnType() instanceof IntegralType and
|
||||
this = m.getAReference()
|
||||
)
|
||||
}
|
||||
|
||||
/** Returns an argument which would be logged by this call. */
|
||||
|
||||
Reference in New Issue
Block a user