Polishing

This commit is contained in:
Juergen Hoeller
2015-12-02 15:35:42 +01:00
parent 747863d503
commit a9e5e9ecc8
4 changed files with 21 additions and 17 deletions

View File

@@ -95,13 +95,11 @@ public class MappingMediaTypeFileExtensionResolver implements MediaTypeFileExten
}
/**
* Use this method for a reverse, case-insensitive MediaType lookup.
* @param extension the extension to look up
* @return a MediaType for the key or {@code null}
* Use this method for a reverse lookup from extension to MediaType.
* @return a MediaType for the key, or {@code null} if none found
*/
protected MediaType lookupMediaType(String extension) {
extension = extension.toLowerCase(Locale.ENGLISH);
return this.mediaTypes.get(extension);
return this.mediaTypes.get(extension.toLowerCase(Locale.ENGLISH));
}
}