mirror of
https://github.com/github/codeql.git
synced 2026-02-01 07:42:57 +01:00
simplify expressions that could be type-casts
This commit is contained in:
@@ -60,7 +60,7 @@ predicate exception(EnumConstant e) {
|
||||
)
|
||||
or
|
||||
// Entire `Enum` annotated with reflective annotation.
|
||||
exists(ReflectiveAccessAnnotation ann | ann = t.getAnAnnotation())
|
||||
t.getAnAnnotation() instanceof ReflectiveAccessAnnotation
|
||||
)
|
||||
or
|
||||
// Enum field annotated with reflective annotation.
|
||||
|
||||
@@ -12,6 +12,6 @@ import semmle.code.java.frameworks.Camel
|
||||
class CamelMessageCallableEntryPoint extends CallableEntryPoint {
|
||||
CamelMessageCallableEntryPoint() {
|
||||
exists(CamelTargetClass camelTargetClass | this = camelTargetClass.getACamelCalledMethod()) or
|
||||
exists(CamelConsumeMethod consumeMethod | this = consumeMethod)
|
||||
this instanceof CamelConsumeMethod
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user