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

Confusing local variable name in BaseCluster

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.2.0
    • None
    • Internal
    • None

    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

            Unassigned Unassigned
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: