felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alin Dreghiciu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-582) felix URLs do not return a proper value for lastModified()
Date Sat, 02 Aug 2008 13:01:44 GMT

     [ https://issues.apache.org/jira/browse/FELIX-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Alin Dreghiciu updated FELIX-582:

    Attachment: FELIX-582.patch

I attached a simple patch to solve the issue.
It will return the Bundle.getLastModified() for bundle based urls.
In this condition that bundle last modified is always returned I'm wondering if getLastModified
method should do the connect at all as the modified time is already set. But I suppose that
is good as in case of a failure (url cannot be connected) the returned time is 0 (zero).

Still I do not know if is a valid time to be returned as the returned time will be the same
= bundle last modified for all resources in a bundle and as the url refer a specific file
I guess better will be to get the last modified of that specific file not the time when the
bundle was installed/updated = bundle last modified.
In that case what Karl proposed JarEntry.getTime() sounds more appropriate and maybe just
fallback to bundle las modified if somehow the returned time is zero or cannot be determined.

> felix URLs do not return a proper value for lastModified()
> ----------------------------------------------------------
>                 Key: FELIX-582
>                 URL: https://issues.apache.org/jira/browse/FELIX-582
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.0.4
>            Reporter: Costin Leau
>             Fix For: felix-1.2.0
>         Attachments: FELIX-582.patch
> URLs loaded through Felix, pointing to resources inside OSGi space rely on the default
lastModified() implementation which always returns 0. Since the platform knows about the originating
bundle it can use the bundle lastmodified instead of 0.
> Other URL/URLConnection methods can be potentially implemented instead of relying on
the defaults (such as file type for example).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message