diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java index fb5d304bd0..f095ae4c17 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java @@ -554,13 +554,13 @@ class ConfigurationClassParser { Class group = deferredImport.getImportSelector().getImportGroup(); DeferredImportSelectorGrouping grouping = groupings.computeIfAbsent( (group == null ? deferredImport : group), - (key) -> new DeferredImportSelectorGrouping(createGroup(group))); + key -> new DeferredImportSelectorGrouping(createGroup(group))); grouping.add(deferredImport); configurationClasses.put(deferredImport.getConfigurationClass().getMetadata(), deferredImport.getConfigurationClass()); } for (DeferredImportSelectorGrouping grouping : groupings.values()) { - grouping.getImports().forEach((entry) -> { + grouping.getImports().forEach(entry -> { ConfigurationClass configurationClass = configurationClasses.get( entry.getMetadata()); try { diff --git a/spring-core/src/main/java/org/springframework/core/env/ProfilesParser.java b/spring-core/src/main/java/org/springframework/core/env/ProfilesParser.java index 268a3cfdbd..7a751885cc 100644 --- a/spring-core/src/main/java/org/springframework/core/env/ProfilesParser.java +++ b/spring-core/src/main/java/org/springframework/core/env/ProfilesParser.java @@ -104,25 +104,25 @@ final class ProfilesParser { } private static Profiles or(Profiles... profiles) { - return (activeProfile) -> Arrays.stream(profiles).anyMatch( + return activeProfile -> Arrays.stream(profiles).anyMatch( isMatch(activeProfile)); } private static Profiles and(Profiles... profiles) { - return (activeProfile) -> Arrays.stream(profiles).allMatch( + return activeProfile -> Arrays.stream(profiles).allMatch( isMatch(activeProfile)); } private static Profiles not(Profiles profiles) { - return (activeProfile) -> !profiles.matches(activeProfile); + return activeProfile -> !profiles.matches(activeProfile); } private static Profiles equals(String profile) { - return (activeProfile) -> activeProfile.test(profile); + return activeProfile -> activeProfile.test(profile); } private static Predicate isMatch(Predicate activeProfile) { - return (profiles) -> profiles.matches(activeProfile); + return profiles -> profiles.matches(activeProfile); } private enum Operator { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceUrlProvider.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceUrlProvider.java index fd338658ba..5404a570b5 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceUrlProvider.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceUrlProvider.java @@ -154,9 +154,7 @@ public class ResourceUrlProvider implements ApplicationListener resolvers = handler.getResourceResolvers(); ResourceResolverChain chain = new DefaultResourceResolverChain(resolvers); return chain.resolveUrlPath(path.value(), handler.getLocations()) - .map(resolvedPath -> { - return mapping.value() + resolvedPath; - }); + .map(resolvedPath -> mapping.value() + resolvedPath); }) .orElseGet(() ->{ diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java index b5ccc95115..474622156f 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java @@ -207,9 +207,7 @@ public class VersionResourceResolver extends AbstractResourceResolver { } return chain.resolveResource(null, baseUrl, locations) .flatMap(resource -> strategy.getResourceVersion(resource) - .map(version -> { - return strategy.addVersion(baseUrl, version); - })); + .map(version -> strategy.addVersion(baseUrl, version))); } return Mono.empty(); });