Polishing
This commit is contained in:
@@ -70,7 +70,7 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver {
|
||||
/**
|
||||
* Configure a fixed default locale to fall back on if the request does not
|
||||
* have an "Accept-Language" header.
|
||||
* <p>By default this is not set in which case when there is "Accept-Lanaguage"
|
||||
* <p>By default this is not set in which case when there is "Accept-Language"
|
||||
* header, the default locale for the server is used as defined in
|
||||
* {@link HttpServletRequest#getLocale()}.
|
||||
* @param defaultLocale the default locale to use
|
||||
@@ -81,7 +81,8 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver {
|
||||
}
|
||||
|
||||
/**
|
||||
* The configured default locale.
|
||||
* The configured default locale, if any.
|
||||
* @since 4.3
|
||||
*/
|
||||
public Locale getDefaultLocale() {
|
||||
return this.defaultLocale;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.1
|
||||
*/
|
||||
abstract class AbstractMediaTypeExpression implements Comparable<AbstractMediaTypeExpression>, MediaTypeExpression {
|
||||
abstract class AbstractMediaTypeExpression implements MediaTypeExpression, Comparable<AbstractMediaTypeExpression> {
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@@ -66,6 +66,7 @@ abstract class AbstractMediaTypeExpression implements Comparable<AbstractMediaTy
|
||||
return this.isNegated;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int compareTo(AbstractMediaTypeExpression other) {
|
||||
return MediaType.SPECIFICITY_COMPARATOR.compare(this.getMediaType(), other.getMediaType());
|
||||
|
||||
Reference in New Issue
Block a user