You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2015/07/29 03:20:04 UTC
[jira] [Commented] (KARAF-3873) TimeoutTask doesn't correctly
remove pending commands
[ https://issues.apache.org/jira/browse/KARAF-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14645327#comment-14645327 ]
Jean-Baptiste Onofré commented on KARAF-3873:
---------------------------------------------
Fixed on Cellar master: https://git-wip-us.apache.org/repos/asf?p=karaf-cellar.git;a=commitdiff;h=71a5f9eb4034716ac73ae53d5e6beb59671ca82b
> 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: cellar-4.0.0.M1, cellar-3.0.3, cellar-2.3.6
> Reporter: Joe Hammerbacher
> Assignee: Jean-Baptiste Onofré
> Fix For: cellar-4.0.0.M1
>
>
> {{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)