Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203786

Dead code in ConcurrentHashMap

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      The following code block in method 'tryPresize(int size)' is dead code. Logically it will never get run, because 'sc' will never be negative:
      if (sc < 0) {
                          Node<K,V>[] nt;
                          if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 ||
                              sc == rs + MAX_RESIZERS || (nt = nextTable) == null ||
                              transferIndex <= 0)
                              break;
                          if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1))
                              transfer(tab, nt);
                      }


      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              psonal Pallavi Sonal
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: