Polish SPR-12286

Issue: SPR-12286
This commit is contained in:
Brian Clozel
2014-10-22 21:15:34 +02:00
parent 2956049c30
commit a011b360d1
4 changed files with 13 additions and 13 deletions

View File

@@ -61,8 +61,6 @@ public class ContentNegotiationManagerFactoryBean
private String parameterName = "format";
private MediaType defaultContentType;
private ContentNegotiationStrategy defaultNegotiationStrategy;
private ContentNegotiationManager contentNegotiationManager;
@@ -186,7 +184,7 @@ public class ContentNegotiationManagerFactoryBean
* determine the requested content type.
*/
public void setDefaultContentType(MediaType defaultContentType) {
this.defaultContentType = defaultContentType;
this.defaultNegotiationStrategy = new FixedContentNegotiationStrategy(defaultContentType);
}
/**
@@ -196,7 +194,7 @@ public class ContentNegotiationManagerFactoryBean
* the requested content type.
* @since 4.1.2
*/
public void setDefaultContentType(ContentNegotiationStrategy defaultStrategy) {
public void setDefaultContentTypeStrategy(ContentNegotiationStrategy defaultStrategy) {
this.defaultNegotiationStrategy = defaultStrategy;
}
@@ -235,10 +233,6 @@ public class ContentNegotiationManagerFactoryBean
strategies.add(new HeaderContentNegotiationStrategy());
}
if (this.defaultContentType != null) {
strategies.add(new FixedContentNegotiationStrategy(this.defaultContentType));
}
if(this.defaultNegotiationStrategy != null) {
strategies.add(defaultNegotiationStrategy);
}