Skip to content

Commit d0c3738

Browse files
committed
Implement code review suggestion
1 parent c52545f commit d0c3738

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

csharp/ql/lib/semmle/code/csharp/frameworks/microsoft/AspNetCore.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,12 @@ private predicate isMicrosoftAspNetCoreMvcApplicationPart(Compilation applicatio
262262
assemblyName.getValue() = part.getName()
263263
)
264264
or
265-
exists(MethodCall addPart, PropertyAccess assemblyAccess, TypeofExpr typeOf, Type partType |
265+
exists(MethodCall addPart, PropertyAccess assemblyAccess, Type partType |
266266
application.getAFileCompiled() = addPart.getFile() and
267267
isMicrosoftAspNetCoreMvcAddApplicationPart(addPart) and
268268
assemblyAccess = addPart.getArgumentForName("assembly") and
269269
assemblyAccess.getTarget().hasName("Assembly") and
270-
assemblyAccess.getQualifier() = typeOf and
271-
partType = typeOf.getTypeAccess().getTarget() and
270+
assemblyAccess.getQualifier().(TypeofExpr).getTypeAccess().getTarget() = partType and
272271
part = getAnAssemblyFor(partType)
273272
)
274273
)

0 commit comments

Comments
 (0)