From 27a281ec1053f4afdbd99cf3f585d0ddc8d8bc73 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 11 Oct 2023 16:23:48 +0200 Subject: [PATCH] fix code smell --- .../context/ResourceResolverFactoryConfigPropertyNames.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/wcm/testing/mock/aem/context/ResourceResolverFactoryConfigPropertyNames.java b/core/src/main/java/io/wcm/testing/mock/aem/context/ResourceResolverFactoryConfigPropertyNames.java index 759b5692..d82e89a2 100644 --- a/core/src/main/java/io/wcm/testing/mock/aem/context/ResourceResolverFactoryConfigPropertyNames.java +++ b/core/src/main/java/io/wcm/testing/mock/aem/context/ResourceResolverFactoryConfigPropertyNames.java @@ -19,6 +19,7 @@ */ package io.wcm.testing.mock.aem.context; +import java.lang.reflect.Method; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -42,7 +43,7 @@ final class ResourceResolverFactoryConfigPropertyNames { try { Class resourceResolverFactoryConfigClass = Class.forName(ResourceResolverFactoryConfig.class.getName()); Set methodNames = Stream.of(resourceResolverFactoryConfigClass.getDeclaredMethods()) - .map(method -> method.getName()) + .map(Method::getName) .collect(Collectors.toSet()); // use new names as fields do exist if (methodNames.contains("resource_resolver_vanitypath_allowlist")