You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/04/15 22:36:07 UTC
[GitHub] [accumulo] ctubbsii commented on a diff in pull request #2636: Update Apache parent POM, modernizer
ctubbsii commented on code in PR #2636:
URL: https://github.com/apache/accumulo/pull/2636#discussion_r851542074
##########
core/src/main/java/org/apache/accumulo/core/client/rfile/RFileWriterBuilder.java:
##########
@@ -98,7 +98,8 @@ public RFileWriter build() throws IOException {
userProps.putAll(samplerProps);
if (!userProps.isEmpty()) {
- acuconf = new ConfigurationCopy(Iterables.concat(acuconf, userProps.entrySet()));
+ acuconf =
+ new ConfigurationCopy(Stream.concat(acuconf.stream(), userProps.entrySet().stream()));
Review Comment:
If you mean in the constructor, it's just because Stream has an iterator method already, but isn't marked with the "Iterable" interface. Using invoke direct on the stream's iterator method by declaring it as a lambda in the constructor effectively forces it to conform to the Iterable interface, but doesn't actually construct a new Iterable or do any conversion.
This is really only weird because we have so many "Iterable" usages that are leftover from before Java had Streams. As we use Streams more, and Iterables less, we'll run into fewer of these weird situations.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org