Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3873

TimeoutTask doesn't correctly remove pending commands

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • cellar-4.0.0, cellar-3.0.3, cellar-2.3.6
    • cellar
    • None

    Description

      TimeoutTask uses the following code to attempt to remove pending commands after the timeout period has expired:

              Boolean pending = store.getPending().containsKey(command);
              if (pending) {
                  store.getPending().remove(command);
              }
      

      However, the keys for the ConcurrentMap returned by getPending() are of type String, not Command. As a result, pending is always false (and even if it were true, remove would fail to do anything).

      The intended functionality is likely:

              Boolean pending = store.getPending().containsKey(command.getId());
              if (pending) {
                  store.getPending().remove(command.getId());
              }
      

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jhammer03 Joe Hammerbacher
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: