Confusing local variable name in BaseCluster

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 3.2.0
    • Affects Version/s: None
    • Component/s: Internal
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Whilst debugging async I noticed:

              final CountDownLatch current = phase.getAndSet(new CountDownLatch(1));
              current.countDown();
      

      https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/BaseCluster.java#L192-L193

      getAndSet returns the previous value - so is the countdown wrong or should it be the new phase thats counted down?

              Assignee:
              Unassigned
              Reporter:
              Ross Lawley
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: