Skip to content

Commit e60d432

Browse files
committed
Bumping versions
1 parent deabba6 commit e60d432

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/support/SpringMvcContract.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,10 @@ public MethodMetadata parseAndValidateMetadata(Class<?> targetType, Method metho
241241

242242
if (isGetMethod(metadata) && method.getParameterCount() > 0 && !hasHttpAnnotations(method)) {
243243
if (LOG.isWarnEnabled()) {
244-
LOG.warn(String.format(
245-
"[OpenFeign Warning] Feign method '%s' is declared as GET with parameters, but none of the parameters are annotated " +
246-
"(e.g. @RequestParam, @RequestHeader, @PathVariable, etc). This may result in fallback to POST at runtime. " +
247-
"Consider explicitly annotating parameters.",
248-
method.toGenericString()
249-
));
244+
LOG.warn(String
245+
.format("[OpenFeign Warning] Feign method '%s' is declared as GET with parameters, but none of the parameters are annotated "
246+
+ "(e.g. @RequestParam, @RequestHeader, @PathVariable, etc). This may result in fallback to POST at runtime. "
247+
+ "Consider explicitly annotating parameters.", method.toGenericString()));
250248
}
251249
}
252250

@@ -261,11 +259,9 @@ private boolean hasHttpAnnotations(Method method) {
261259
for (Parameter parameter : method.getParameters()) {
262260
for (Annotation annotation : parameter.getAnnotations()) {
263261
Class<? extends Annotation> annotationType = annotation.annotationType();
264-
if (annotationType == RequestParam.class ||
265-
annotationType == RequestHeader.class ||
266-
annotationType == PathVariable.class ||
267-
annotationType == SpringQueryMap.class ||
268-
annotationType == QueryMap.class) {
262+
if (annotationType == RequestParam.class || annotationType == RequestHeader.class
263+
|| annotationType == PathVariable.class || annotationType == SpringQueryMap.class
264+
|| annotationType == QueryMap.class) {
269265
return true;
270266
}
271267
}

0 commit comments

Comments
 (0)