Restrict fluent api models to same type access

This commit is contained in:
Benjamin Muskalla
2021-10-26 16:28:27 +02:00
parent 8564c9001a
commit 747ab122c3
2 changed files with 7 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ string captureFlow(Callable api) {
string captureQualifierFlow(Callable api) {
exists(ReturnStmt rtn |
rtn.getEnclosingCallable() = api and
rtn.getResult() instanceof ThisAccess
rtn.getResult().(ThisAccess).isOwnInstanceAccess()
) and
result = asValueModel(api, "Argument[-1]", "ReturnValue")
}

View File

@@ -6,4 +6,10 @@ public final class FluentAPI {
return this;
}
public class Inner {
public FluentAPI notThis(String input) {
return FluentAPI.this;
}
}
}