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

Confusing local variable name in BaseCluster

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: Internal
    • Labels:
      None
    • Sprint:
      Java Sprint 29

      Description

      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?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ross.lawley Ross Lawley
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: