Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9774

Word Count Example should be <String, Long> instead of <String, Integer>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 9.4.3.Final, 10.0.0.Final
    • 9.4.2.Final, 10.0.0.Final
    • None
    • None

      In the Word Count Example ( http://infinispan.org/docs/stable/user_guide/user_guide.html#examples_2 ) we have

      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()));
         }
      }
      

      It should be

      Map<String, Long> wordCountMap
      

              dlovison@redhat.com Diego Lovison
              dlovison@redhat.com Diego Lovison
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: