Skip to content

Commit

Permalink
4.x: Remove unused method ConfigMapperManager.mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain1653 committed Jan 3, 2025
1 parent 51d07df commit 2da514f
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2023 Oracle and/or its affiliates.
* Copyright (c) 2017, 2025 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -96,16 +96,6 @@ public <T> T map(String value, GenericType<T> type, String key) throws MissingVa
return map(simpleConfig(key, value), type);
}

@SuppressWarnings("unchecked")
<T> Optional<? extends BiFunction<Config, ConfigMapper, T>> mapper(GenericType<T> type) {
Mapper<T> mapper = (Mapper<T>) mappers.get(type);
if (null == mapper) {
return mapperProviders.findMapper(type, Config.Key.create(""));
} else {
return Optional.of(mapper);
}
}

private <T> Mapper<T> findMapper(GenericType<T> type, Config.Key key) {
return mapperProviders.findMapper(type, key)
.orElseGet(() -> noMapper(type));
Expand Down

0 comments on commit 2da514f

Please sign in to comment.