Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1574

Confusing local variable name in BaseCluster

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0
    • Affects Version/s: None
    • Component/s: Internal
    • 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 Unassigned
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: