simplify expressions that could be type-casts

This commit is contained in:
Erik Krogh Kristensen
2022-01-20 10:41:35 +01:00
parent 547f492be0
commit 4e8e3a7420
70 changed files with 123 additions and 143 deletions

View File

@@ -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.

View File

@@ -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
}
}