Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Bartoš <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
  • Loading branch information
vmuzikar and mabartos authored Dec 10, 2024
1 parent bcd8325 commit 741e4d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public PropertyMapper<T> build() {
return new WildcardPropertyMapper<>(option, to, isEnabled, enabledWhen, mapper, mapFrom, parentMapper, paramLabel, isMasked, validator, description, isRequired, requiredWhen, fromWildcardMatcher, wildcardKeysTransformer, wildcardMapFrom);
}
if (wildcardKeysTransformer != null || wildcardMapFrom != null) {
throw new AssertionError("wildcardKeysTransformer not expected with non-wildcard mapper");
throw new AssertionError("Wildcard operations not expected with non-wildcard mapper");
}
return new PropertyMapper<>(option, to, isEnabled, enabledWhen, mapper, mapFrom, parentMapper, paramLabel, isMasked, validator, description, isRequired, requiredWhen, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

public class WildcardPropertyMapper<T> extends PropertyMapper<T> {

private Matcher fromWildcardMatcher;
private Pattern fromWildcardPattern;
private Pattern envVarNameWildcardPattern;
private final Matcher fromWildcardMatcher;
private final Pattern fromWildcardPattern;
private final Pattern envVarNameWildcardPattern;
private Matcher toWildcardMatcher;
private Pattern toWildcardPattern;
private Function<Set<String>, Set<String>> wildcardKeysTransformer;
private ValueMapper wildcardMapFrom;
private final Function<Set<String>, Set<String>> wildcardKeysTransformer;
private final ValueMapper wildcardMapFrom;

public WildcardPropertyMapper(Option<T> option, String to, BooleanSupplier enabled, String enabledWhen,
BiFunction<String, ConfigSourceInterceptorContext, String> mapper,
Expand Down

0 comments on commit 741e4d4

Please sign in to comment.