[infinispan-issues] [JBoss JIRA] (ISPN-9774) Word Count Example should be <String, Long> instead of <String, Integer>
Diego Lovison (Jira)
issues at jboss.org
Tue Nov 27 05:58:00 EST 2018
Diego Lovison created ISPN-9774:
-----------------------------------
Summary: Word Count Example should be <String, Long> instead of <String, Integer>
Key: ISPN-9774
URL: https://issues.jboss.org/browse/ISPN-9774
Project: Infinispan
Issue Type: Bug
Affects Versions: 9.4.2.Final
Reporter: Diego Lovison
In the Word Count Example ( http://infinispan.org/docs/stable/user_guide/user_guide.html#examples_2 ) we have
{code:java}
public class WordCountExample {
public static void main(String[] args) {
// Lines removed
Map<String, Integer> wordCountMap = c1.entrySet().parallelStream()
.map(e -> e.getValue().split("\\s"))
.flatMap(Arrays::stream)
.collect(() -> Collectors.groupingBy(Function.identity(), Collectors.counting()));
}
}
{code}
It should be
{code:java}
Map<String, Long> wordCountMap
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list