[
https://issues.apache.org/jira/browse/FELIX-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250333#comment-17250333
]
Tom Watson commented on FELIX-6163:
-----------------------------------
[~karlpauls] for ServiceTracker did you fix this to use nanoTime?:
https://github.com/osgi/osgi/blob/r8-core-final/org.osgi.util.tracker/src/org/osgi/util/tracker/ServiceTracker.java#L496-L514
I opened issue https://github.com/osgi/osgi/issues/148 to get this fixed at the
OSGi source.
> 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
> Affects Versions: framework-6.0.3
> Reporter: Tobias Gunkel
> Assignee: Karl Pauls
> Priority: Major
> Fix For: framework-7.0.0
>
>
> 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
(v8.3.4#803005)