pjfanning opened a new pull request, #3716:
URL: https://github.com/apache/pekko/pull/3716

   ### Motivation
   The Java stream quickstart sample copies each tweet's hashtag `Set` into a 
new `ArrayList` before returning it from `mapConcat`. The Java DSL `mapConcat` 
accepts any `java.lang.Iterable`, so the copy is unnecessary and suggests to 
readers that a `List` is required.
   
   ### Modification
   Return `t.hashtags()` directly in the `#hashtags-mapConcat` and 
`#graph-dsl-broadcast` snippets of `TwitterStreamQuickstartDocTest`, and remove 
the unused `ArrayList` import.
   
   ### Result
   The Java sample shown in the stream quickstart matches the documented 
contract that the function returns an `Iterable`.
   
   ### Tests
   - Not run - docs only
   
   ### References
   None - docs sample cleanup


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to