Remove deprecated ConfigSourceInterceptor method (#28055)
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
parent
b24d446911
commit
bf1248d062
1 changed files with 5 additions and 11 deletions
|
@ -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;
|
||||
|
||||
|
@ -61,11 +60,11 @@ public class PropertyMappingInterceptor implements ConfigSourceInterceptor {
|
|||
disable.remove();
|
||||
}
|
||||
|
||||
<T> Iterator<T> filterRuntime(Iterator<T> iter, Function<T, String> nameFunc) {
|
||||
static Iterator<String> filterRuntime(Iterator<String> 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) {
|
||||
|
@ -75,12 +74,7 @@ public class PropertyMappingInterceptor implements ConfigSourceInterceptor {
|
|||
|
||||
@Override
|
||||
public Iterator<String> iterateNames(ConfigSourceInterceptorContext context) {
|
||||
return filterRuntime(context.iterateNames(), Function.identity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<ConfigValue> iterateValues(ConfigSourceInterceptorContext context) {
|
||||
return filterRuntime(context.iterateValues(), ConfigValue::getName);
|
||||
return filterRuntime(context.iterateNames());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue