File tree Expand file tree Collapse file tree
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,24 +230,14 @@ class CallableAlwaysReturnsParameter0 extends CallableReturnsStringAndArg0IsStri
230230 */
231231class CallableAlwaysReturnsParameter0MayThrowExceptions extends CallableReturnsStringAndArg0IsString {
232232 CallableAlwaysReturnsParameter0MayThrowExceptions ( ) {
233- callableOnlyThrowsArgumentNullException ( this ) and
234- forall ( ReturnStmt rs | rs .getEnclosingCallable ( ) = this |
235- rs .getChild ( 0 ) = this .getParameter ( 0 ) .getAnAccess ( )
236- ) and
237- exists ( ReturnStmt rs | rs .getEnclosingCallable ( ) = this )
233+ forex ( Expr ret | this .canReturn ( ret ) |
234+ ret = this .getParameter ( 0 ) .getAnAccess ( )
238235 or
239- exists (
240- AnonymousFunctionExpr le , Call call , CallableAlwaysReturnsParameter0MayThrowExceptions cat
241- |
242- this = le
243- |
244- call = le .getExpressionBody ( ) and
245- cat .getACall ( ) = call and
246- callableOnlyThrowsArgumentNullException ( le ) and
247- callableOnlyThrowsArgumentNullException ( cat )
236+ exists ( CallableAlwaysReturnsParameter0MayThrowExceptions c |
237+ ret = c .getACall ( ) and
238+ ret .( Call ) .getArgument ( 0 ) = this .getParameter ( 0 ) .getAnAccess ( )
248239 )
249- or
250- this .getBody ( ) = this .getParameter ( 0 ) .getAnAccess ( )
240+ )
251241 }
252242}
253243
You can’t perform that action at this time.
0 commit comments