You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Tobias Gunkel (JIRA)" <ji...@apache.org> on 2019/07/24 13:35:00 UTC

[jira] [Commented] (FELIX-6163) ServiceTracker should not use System.currentTimeMillis() to check timeouts

    [ https://issues.apache.org/jira/browse/FELIX-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16891859#comment-16891859 ] 

Tobias Gunkel commented on FELIX-6163:
--------------------------------------

The same applies to:
 * org/apache/felix/framework/util/ThreadGate.await()
 * org/apache/felix/eventadmin/impl/tasks/HandlerTask.run()/getTaskTime()
 * org/apache/felix/coordinator/impl/CoordinationMgr.lockParticipant()
 * org/apache/felix/coordinator/impl/CoordinationImpl.java

> ServiceTracker should not use System.currentTimeMillis() to check timeouts
> --------------------------------------------------------------------------
>
>                 Key: FELIX-6163
>                 URL: https://issues.apache.org/jira/browse/FELIX-6163
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Tobias Gunkel
>            Priority: Major
>
> ServiceTracker uses System.currentTimeMillis() to check timeouts in waitForService().
> If the system time changes either:
>  * the timeout might occur to soon - if the time was set to the future
>  * the timeout might not occur in a reasonable time - if the time was set to the past
> Instead of System.currentTimeMillis() the system tick based System.nanoTime() should be used as it does not to change after the system time is changed.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)