mjsax commented on code in PR #18867:
URL: https://github.com/apache/kafka/pull/18867#discussion_r1952156471
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/AbstractStream.java:
##########
@@ -99,14 +99,14 @@ static <K, VRight, VLeft, VOut> ValueJoinerWithKey<K,
VRight, VLeft, VOut> rever
return (key, value2, value1) -> joiner.apply(key, value1, value2);
}
- static <K, V, VOut> ValueMapperWithKey<K, V, VOut> withKey(final
ValueMapper<V, VOut> valueMapper) {
- Objects.requireNonNull(valueMapper, "valueMapper cannot be null");
- return (readOnlyKey, value) -> valueMapper.apply(value);
+ static <K, V, VOut> ValueMapperWithKey<K, V, VOut> withKey(final
ValueMapper<V, VOut> mapper) {
+ Objects.requireNonNull(mapper, "mapper cannot be null");
Review Comment:
align parameter name to `mapper` across the board, to avoid `mapper` vs
`valueMapper` vs `valueMapperWithKey` (simplifies error handling, and we don't
need to worry about the error message, that can just way `mapper` if we only
use `mapper` across the board)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]