From 97e0b4e9fd0aa47f8313d0ef3f6c5997f7c636d7 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 15 Jan 2026 10:33:35 +0000 Subject: [PATCH] Use parameter name to only select correct overloads --- .../frameworks/spring/SpringWebClient.qll | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebClient.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebClient.qll index 991a1c72981..64c00f830ed 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebClient.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebClient.qll @@ -42,31 +42,7 @@ private class SpringRestTemplateMethodWithUriVariablesParameter extends Method { SpringRestTemplateMethodWithUriVariablesParameter() { this.getDeclaringType() instanceof SpringRestTemplate and - ( - this.hasName("delete") and pos = 1 - or - this.hasName("exchange") and pos = 4 - or - this.hasName("execute") and pos = 4 - or - this.hasName("getForEntity") and pos = 2 - or - this.hasName("getForObject") and pos = 2 - or - this.hasName("headForHeaders") and pos = 1 - or - this.hasName("optionsForAllow") and pos = 1 - or - this.hasName("patchForObject") and pos = 3 - or - this.hasName("postForEntity") and pos = 3 - or - this.hasName("postForLocation") and pos = 2 - or - this.hasName("postForObject") and pos = 3 - or - this.hasName("put") and pos = 2 - ) + this.getParameter(pos).getName() = "uriVariables" } int getUriVariablesPosition() { result = pos }