Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions extensions/ql-vscode/src/model-editor/bqrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ export function decodeBqrsToMethods(
classification = CallClassification.Unknown;
}

if (!methodParameters.startsWith("(")) {
// There's a difference in how the Java and C# queries return method parameters. In the C# query, the method
// parameters are returned without parentheses. In the Java query, the method parameters are returned with
// parentheses. Therefore, we'll just add them if we don't see them.
methodParameters = `(${methodParameters})`;
}

const signature = `${packageName}.${typeName}#${methodName}${methodParameters}`;

// For Java, we'll always get back a .jar file, and the library version may be bad because not all library authors
Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/src/model-editor/queries/csharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class Endpoint extends Callable {
* Gets the parameter types of this endpoint.
*/
bindingset[this]
string getParameterTypes() { result = parameterQualifiedTypeNamesToString(this) }
string getParameterTypes() { result = "(" + parameterQualifiedTypeNamesToString(this) + ")" }

private string getDllName() { result = this.getLocation().(Assembly).getName() }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ describe("decodeBqrsToMethods", () => {
"System.Reflection",
"RuntimeReflectionExtensions",
"GetMethodInfo",
"System.Delegate",
"(System.Delegate)",
true,
"mscorlib",
"4.0.0.0",
Expand Down Expand Up @@ -651,7 +651,7 @@ describe("decodeBqrsToMethods", () => {
"Moq",
"Times",
"Validate",
"System.Int32",
"(System.Int32)",
false,
"Times.cs",
"",
Expand Down