mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Adjust PathSanitizer to use fixed $default extension method functionality
This commit is contained in:
@@ -298,8 +298,8 @@ private class PathNormalizeSanitizer extends MethodAccess {
|
||||
* what `getQualifier` actually gets in Java and Kotlin.
|
||||
*/
|
||||
private Expr getVisualQualifier(MethodAccess ma) {
|
||||
if getSourceMethod(ma.getMethod()) instanceof ExtensionMethod
|
||||
then result = ma.getArgument(0)
|
||||
if ma.getMethod() instanceof ExtensionMethod
|
||||
then result = ma.getArgument(ma.getMethod().(ExtensionMethod).getExtensionParameterIndex())
|
||||
else result = ma.getQualifier()
|
||||
}
|
||||
|
||||
@@ -310,8 +310,10 @@ private Expr getVisualQualifier(MethodAccess ma) {
|
||||
*/
|
||||
bindingset[argPos]
|
||||
private Argument getVisualArgument(MethodAccess ma, int argPos) {
|
||||
if getSourceMethod(ma.getMethod()) instanceof ExtensionMethod
|
||||
then result = ma.getArgument(argPos + 1)
|
||||
if ma.getMethod() instanceof ExtensionMethod
|
||||
then
|
||||
result =
|
||||
ma.getArgument(argPos + ma.getMethod().(ExtensionMethod).getExtensionParameterIndex() + 1)
|
||||
else result = ma.getArgument(argPos)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user