Restore formatting change following revert
This commit is contained in:
@@ -281,8 +281,7 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe
|
||||
inputMessage, outputMessage);
|
||||
if (body != null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
Object formatted = (body instanceof CharSequence ? "\"" + body + "\"" : body);
|
||||
logger.debug("Writing [" + formatted + "]");
|
||||
logger.debug("Writing [" + formatValue(body) + "]");
|
||||
}
|
||||
addContentDispositionHeader(inputMessage, outputMessage);
|
||||
if (genericConverter != null) {
|
||||
@@ -399,6 +398,10 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe
|
||||
return (MediaType.SPECIFICITY_COMPARATOR.compare(acceptType, produceTypeToUse) <= 0 ? acceptType : produceTypeToUse);
|
||||
}
|
||||
|
||||
static String formatValue(Object body) {
|
||||
return (body instanceof CharSequence ? "\"" + body + "\"" : body.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the path has a file extension and whether the extension is
|
||||
* either {@link #WHITELISTED_EXTENSIONS whitelisted} or explicitly
|
||||
|
||||
@@ -885,8 +885,8 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
mavContainer = (ModelAndViewContainer) asyncManager.getConcurrentResultContext()[0];
|
||||
asyncManager.clearConcurrentResult();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Resume with async result [" +
|
||||
(result instanceof CharSequence ? "\"" + result + "\"" : result) + "]");
|
||||
String formatted = AbstractMessageConverterMethodProcessor.formatValue(result);
|
||||
logger.debug("Resume with async result [" + formatted + "]");
|
||||
}
|
||||
invocableMethod = invocableMethod.wrapConcurrentResult(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user