From 99b54bb8e6386a0474c05efbea82ae911b7cde70 Mon Sep 17 00:00:00 2001 From: Hasini Samarathunga Date: Fri, 8 Nov 2024 15:06:11 +0530 Subject: [PATCH] Fix build failure errors --- .../web/accept/MappingMediaTypeFileExtensionResolver.java | 2 +- .../web/reactive/resource/ResourceWebHandler.java | 2 +- .../web/servlet/resource/ResourceHttpRequestHandler.java | 2 +- src/docs/asciidoc/testing.adoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java b/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java index c5ad7cc706ce..8deeebc65f2c 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java +++ b/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java @@ -109,7 +109,7 @@ public List getAllFileExtensions() { */ @Nullable protected MediaType lookupMediaType(String extension) { - return this.mediaTypes.get(extension.toLowerCase(Locale.ROOT); + return this.mediaTypes.get(extension.toLowerCase(Locale.ROOT)); } } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java index 959c69e1caa5..94866018839d 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java @@ -605,7 +605,7 @@ private MediaType getMediaType(Resource resource) { if (!CollectionUtils.isEmpty(this.mediaTypes)) { String ext = StringUtils.getFilenameExtension(filename); if (ext != null) { - mediaType = this.mediaTypes.get(ext.toLowerCase(Locale.ROOT); + mediaType = this.mediaTypes.get(ext.toLowerCase(Locale.ROOT)); } } if (mediaType == null) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java index 5146eb51ded3..83eb33b24e2a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java @@ -786,7 +786,7 @@ protected MediaType getMediaType(HttpServletRequest request, Resource resource) String filename = resource.getFilename(); String ext = StringUtils.getFilenameExtension(filename); if (ext != null) { - mediaType = this.mediaTypes.get(ext.toLowerCase(Locale.ROOT); + mediaType = this.mediaTypes.get(ext.toLowerCase(Locale.ROOT)); } if (mediaType == null) { List mediaTypes = MediaTypeFactory.getMediaTypes(filename); diff --git a/src/docs/asciidoc/testing.adoc b/src/docs/asciidoc/testing.adoc index 2481097e8b40..264a2227da09 100644 --- a/src/docs/asciidoc/testing.adoc +++ b/src/docs/asciidoc/testing.adoc @@ -2002,7 +2002,7 @@ test methods within that class are automatically disabled as well. Expressions can be any of the following: * <> (SpEL) expression. For example: - `@DisabledIf("#{systemProperties['os.name'].toLowerCase(Locale.ROOT).contains('mac')}")` + `@DisabledIf("#{systemProperties['os.name'].toLowerCase().contains('mac')}")` * Placeholder for a property available in the Spring <>. For example: `@DisabledIf("${smoke.tests.disabled}")` * Text literal. For example: `@DisabledIf("true")`