Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C34B18373 for ; Thu, 23 Jul 2015 17:51:11 +0000 (UTC) Received: (qmail 13752 invoked by uid 500); 23 Jul 2015 17:51:05 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 13662 invoked by uid 500); 23 Jul 2015 17:51:05 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 13365 invoked by uid 99); 23 Jul 2015 17:51:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jul 2015 17:51:04 +0000 Date: Thu, 23 Jul 2015 17:51:04 +0000 (UTC) From: "Joe Hammerbacher (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (KARAF-3873) TimeoutTask doesn't correctly remove pending commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Joe Hammerbacher created KARAF-3873: --------------------------------------- Summary: TimeoutTask doesn't correctly remove pending commands Key: KARAF-3873 URL: https://issues.apache.org/jira/browse/KARAF-3873 Project: Karaf Issue Type: Bug Components: cellar-core Affects Versions: 4.0.0, cellar-3.0.3 Reporter: Joe Hammerbacher {{TimeoutTask}} uses the following code to attempt to remove pending commands after the timeout period has expired: {noformat} Boolean pending = store.getPending().containsKey(command); if (pending) { store.getPending().remove(command); } {noformat} 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: {noformat} Boolean pending = store.getPending().containsKey(command.getId()); if (pending) { store.getPending().remove(command.getId()); } {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)