You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
predicate callsFooApi(Method m) {
exists(delegatedMethod dm |
dm.getSignature() = m.getSignature() and
(
callsOne(dm) or
callsTwo(dm) or
callsThree(dm)
)
)
}
So I want to know how I can :
short circuit the logic so that if a single delegated Method passes one of the booleans (callsOne .. callsThree), we should stop looking at other delagated Methods.
short circuit the actual calls logic so that if callsOne passes, we don't need to verify callsTwo and callsThree
I know there are a bunch of annotations that codeQL supports, but im not sure how to pick the right ones.
For reference the delegated method logic is needed since our java code has a bunch of methods overriding each other from difference interfaces and looking at getAnOverride and/or getAnImpl doesn't find all the necessary methods, so resolving methods by signature works in our case.
Also the callsOne ... callsThree are predicates that perform dataflow and we are ranking them from least resources consuming to most.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I have this predicate :
So I want to know how I can :
I know there are a bunch of annotations that codeQL supports, but im not sure how to pick the right ones.
For reference the delegated method logic is needed since our java code has a bunch of methods overriding each other from difference interfaces and looking at getAnOverride and/or getAnImpl doesn't find all the necessary methods, so resolving methods by signature works in our case.
Also the callsOne ... callsThree are predicates that perform dataflow and we are ranking them from least resources consuming to most.
Beta Was this translation helpful? Give feedback.
All reactions