Browse Source

Fix debug log for no matching acceptableTypes

pull/27953/head
GatinMI 4 years ago committed by Brian Clozel
parent
commit
b158110801
  1. 6
      spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java

6
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java

@ -242,12 +242,12 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe @@ -242,12 +242,12 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe
}
}
if (mediaTypesToUse.isEmpty()) {
if (body != null) {
throw new HttpMediaTypeNotAcceptableException(producibleTypes);
}
if (logger.isDebugEnabled()) {
logger.debug("No match for " + acceptableTypes + ", supported: " + producibleTypes);
}
if (body != null) {
throw new HttpMediaTypeNotAcceptableException(producibleTypes);
}
return;
}

Loading…
Cancel
Save