parent
a55b50b512
commit
6712c044b1
|
@ -76,7 +76,7 @@ public class ResourceDecoder extends AbstractDataBufferDecoder<Resource> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Class<?> clazz = elementType.toClass();
|
Class<?> clazz = elementType.toClass();
|
||||||
String filename = hints != null ? (String) hints.get(FILENAME_HINT) : null;
|
String filename = (hints != null ? (String) hints.get(FILENAME_HINT) : null);
|
||||||
if (clazz == InputStreamResource.class) {
|
if (clazz == InputStreamResource.class) {
|
||||||
return new InputStreamResource(new ByteArrayInputStream(bytes)) {
|
return new InputStreamResource(new ByteArrayInputStream(bytes)) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -399,7 +399,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String formatMappingName() {
|
protected String formatMappingName() {
|
||||||
return this.beanName != null ? "'" + this.beanName + "'" : getClass().getName();
|
return (this.beanName != null ? "'" + this.beanName + "'" : getClass().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -589,9 +589,9 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||||
private RequestPath getRequestPath(HttpServletRequest request) {
|
private RequestPath getRequestPath(HttpServletRequest request) {
|
||||||
// Expect pre-parsed path with DispatcherServlet,
|
// Expect pre-parsed path with DispatcherServlet,
|
||||||
// but otherwise parse per handler lookup + cache for handling
|
// but otherwise parse per handler lookup + cache for handling
|
||||||
return request.getAttribute(DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE) != null ?
|
return (request.getAttribute(DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE) != null ?
|
||||||
ServletRequestPathUtils.getParsedRequestPath(request) :
|
ServletRequestPathUtils.getParsedRequestPath(request) :
|
||||||
ServletRequestPathUtils.parseAndCache(request);
|
ServletRequestPathUtils.parseAndCache(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -676,7 +676,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||||
prev = curr;
|
prev = curr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sb != null ? sb.toString() : path;
|
return (sb != null ? sb.toString() : path);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String cleanLeadingSlash(String path) {
|
private String cleanLeadingSlash(String path) {
|
||||||
|
|
|
@ -233,8 +233,8 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String mediaTypeInfo = logger.isDebugEnabled() && requestedMediaTypes != null ?
|
String mediaTypeInfo = (logger.isDebugEnabled() && requestedMediaTypes != null ?
|
||||||
" given " + requestedMediaTypes.toString() : "";
|
" given " + requestedMediaTypes.toString() : "");
|
||||||
|
|
||||||
if (this.useNotAcceptableStatusCode) {
|
if (this.useNotAcceptableStatusCode) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
|
|
Loading…
Reference in New Issue