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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 9.4.2.Final, 10.0.0.Alpha1
    • Fix Version/s: 9.4.3.Final, 10.0.0.Alpha2
    • Component/s: None
    • Labels:
      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
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dlovison Diego Lovison
                Reporter:
                dlovison Diego Lovison
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: