SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc
@ -864,9 +864,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
@@ -864,9 +864,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
@ -267,9 +272,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -267,9 +272,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
if(logger.isDebugEnabled()){
logger.debug("Requested media type is '"+mediaType+"' (based on filename '"+filename+"')");
@ -281,9 +284,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -281,9 +284,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
logger.debug("Requested media type is '"+mediaType+"' (based on parameter '"+
@ -291,6 +292,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -291,6 +292,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
logger.debug("Requested media types are "+mediaTypes+" (based on Accept header)");
}
@ -298,6 +300,9 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -298,6 +300,9 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
}
}
if(this.defaultContentType!=null){
if(logger.isDebugEnabled()){
logger.debug("Requested media types is "+defaultContentType+" (based on defaultContentType property)");
@ -348,10 +353,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -348,10 +353,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
// avoid sorting attempt for empty list and singleton list
Collections.sort(requestedMediaTypes);
}
List<View>candidateViews=newArrayList<View>();
for(ViewResolverviewResolver:this.viewResolvers){
@ -364,32 +365,44 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -364,32 +365,44 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@ -408,6 +421,9 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -408,6 +421,9 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
// see if we can find the extended mime.types from the context-support module
logger.trace("Loading Java Activation Framework FileTypeMap from "+mappingLocation);
}
InputStreaminputStream=null;
try{
inputStream=mappingLocation.getInputStream();
@ -427,6 +443,9 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -427,6 +443,9 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@ -436,7 +455,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -436,7 +455,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@ -446,5 +465,5 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@@ -446,5 +465,5 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
@ -90,6 +92,17 @@ public class MediaType implements Comparable<MediaType> {
@@ -90,6 +92,17 @@ public class MediaType implements Comparable<MediaType> {
@ -100,10 +113,12 @@ public class MediaType implements Comparable<MediaType> {
@@ -100,10 +113,12 @@ public class MediaType implements Comparable<MediaType> {
@ -141,7 +156,7 @@ public class MediaType implements Comparable<MediaType> {
@@ -141,7 +156,7 @@ public class MediaType implements Comparable<MediaType> {
@ -151,7 +166,7 @@ public class MediaType implements Comparable<MediaType> {
@@ -151,7 +166,7 @@ public class MediaType implements Comparable<MediaType> {
@ -166,8 +181,10 @@ public class MediaType implements Comparable<MediaType> {
@@ -166,8 +181,10 @@ public class MediaType implements Comparable<MediaType> {
@ -196,51 +213,6 @@ public class MediaType implements Comparable<MediaType> {
@@ -196,51 +213,6 @@ public class MediaType implements Comparable<MediaType> {
@ -339,8 +311,9 @@ public class MediaType implements Comparable<MediaType> {
@@ -339,8 +311,9 @@ public class MediaType implements Comparable<MediaType> {
@ -358,4 +331,78 @@ public class MediaType implements Comparable<MediaType> {
@@ -358,4 +331,78 @@ public class MediaType implements Comparable<MediaType> {