Fixed ql warning Expression can be replaced with a cast

This commit is contained in:
Napalys Klicius
2025-05-28 17:34:16 +02:00
parent 2e2b9a9d63
commit d3b2a57fbf

View File

@@ -218,9 +218,7 @@ private DataFlow::SourceNode sourceStreamRef(PipeCall pipeCall) {
* Holds if the source stream of the given pipe call has an `error` handler registered.
*/
private predicate hasErrorHandlerRegistered(PipeCall pipeCall) {
exists(ErrorHandlerRegistration handler |
handler = sourceStreamRef(pipeCall).getAMethodCall(getEventHandlerMethodName())
)
sourceStreamRef(pipeCall).getAMethodCall(_) instanceof ErrorHandlerRegistration
or
hasPlumber(pipeCall)
}