diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PropertyMappingInterceptor.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PropertyMappingInterceptor.java index be7d256f28..fe8869b5a7 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PropertyMappingInterceptor.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PropertyMappingInterceptor.java @@ -29,7 +29,6 @@ import org.keycloak.quarkus.runtime.configuration.mappers.PropertyMapper; import org.keycloak.quarkus.runtime.configuration.mappers.PropertyMappers; import java.util.Iterator; -import java.util.function.Function; import static org.keycloak.quarkus.runtime.Environment.isRebuild; @@ -60,14 +59,14 @@ public class PropertyMappingInterceptor implements ConfigSourceInterceptor { public static void enable() { disable.remove(); } - - Iterator filterRuntime(Iterator iter, Function nameFunc) { + + static Iterator filterRuntime(Iterator iter) { if (!isRebuild() && !Environment.isRebuildCheck()) { return iter; } - return new FilterIterator<>(iter, item -> !isRuntime(nameFunc.apply(item))); + return new FilterIterator<>(iter, item -> !isRuntime(item)); } - + static boolean isRuntime(String name) { PropertyMapper mapper = PropertyMappers.getMapper(name); return mapper != null && mapper.isRunTime(); @@ -75,12 +74,7 @@ public class PropertyMappingInterceptor implements ConfigSourceInterceptor { @Override public Iterator iterateNames(ConfigSourceInterceptorContext context) { - return filterRuntime(context.iterateNames(), Function.identity()); - } - - @Override - public Iterator iterateValues(ConfigSourceInterceptorContext context) { - return filterRuntime(context.iterateValues(), ConfigValue::getName); + return filterRuntime(context.iterateNames()); } @Override