From 88293e4cc9b5f24e9cd02da13ee151d07fe1cadf Mon Sep 17 00:00:00 2001 From: Sergey Tsypanov Date: Wed, 22 Nov 2023 10:36:36 +0200 Subject: [PATCH] Add method name into "RequestParam.value() was empty on parameter" exception message --- .../openfeign/annotation/RequestParamParameterProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/annotation/RequestParamParameterProcessor.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/annotation/RequestParamParameterProcessor.java index c73e9089..bc4d7168 100644 --- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/annotation/RequestParamParameterProcessor.java +++ b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/annotation/RequestParamParameterProcessor.java @@ -60,7 +60,8 @@ public class RequestParamParameterProcessor implements AnnotatedParameterProcess RequestParam requestParam = ANNOTATION.cast(annotation); String name = requestParam.value(); - checkState(emptyToNull(name) != null, "RequestParam.value() was empty on parameter %s", parameterIndex); + checkState(emptyToNull(name) != null, "RequestParam.value() was empty on parameter %s of method %s", + parameterIndex, method.getName()); context.setParameterName(name); Collection query = context.setTemplateParameter(name, data.template().queries().get(name));