mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Java: Performance tweaks
This commit is contained in:
@@ -20,10 +20,10 @@ predicate canThrow(Callable callable, RefType exception) {
|
||||
exists(string uncheckedException |
|
||||
uncheckedException = "RuntimeException" or uncheckedException = "Error"
|
||||
|
|
||||
exception.getASupertype*().hasQualifiedName("java.lang", uncheckedException)
|
||||
exception.getAnAncestor().hasQualifiedName("java.lang", uncheckedException)
|
||||
)
|
||||
or
|
||||
callable.getAnException().getType().getASubtype*() = exception
|
||||
callable.getAnException().getType().getADescendant() = exception
|
||||
}
|
||||
|
||||
from ThrowsTag throwsTag, RefType thrownType, Callable docMethod
|
||||
|
||||
Reference in New Issue
Block a user