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

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

    XMLWordPrintable

Details

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

    Description

      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
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: