Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1300

[proton-j] remove redundant credit update call

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • proton-0.14.0
    • proton-0.15.0
    • proton-j
    • None

    Description

      In TransportImpl.processSenderFlow() there is a redundant call to update the transportLink credit value to be 0 while draining the link,

      transportLink.setLinkCredit(UnsignedInteger.valueOf(0));
      transportLink.setDeliveryCount(transportLink.getDeliveryCount().add(credits));
      transportLink.setLinkCredit(UnsignedInteger.ZERO);
      

      These methods have no side effects, just simple setters/getters, and the same value is set twice, so this change just avoids it looking odd.

      Credit tabish121 for spotting it

      Attachments

        Activity

          People

            robbie Robbie Gemmell
            robbie Robbie Gemmell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: