Typo in LongAdder documentation

XMLWordPrintable

      A DESCRIPTION OF THE REQUEST :
      The example in the documentation of java.util.concurrent.atomic.LongAdder:

      freqs.computeIfAbsent(k -> new LongAdder()).increment();

      should be:

      freqs.computeIfAbsent(key, k -> new LongAdder()).increment();

      JUSTIFICATION :
      computeIfAbsent is a newer method that programmers may find confusing. Let's not confuse them more.


            Assignee:
            Pallavi Sonal (Inactive)
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: