You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Sahoo (JIRA)" <ji...@apache.org> on 2009/06/10 07:13:07 UTC

[jira] Created: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
----------------------------------------------------------------------------------------------------------

                 Key: FELIX-1210
                 URL: https://issues.apache.org/jira/browse/FELIX-1210
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: felix-1.8.0
         Environment: generic
            Reporter: Sahoo
             Fix For: felix-2.0.0


Refer to the entire discussion in users alias:
http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo

I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.


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


[jira] Commented: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718133#action_12718133 ] 

Sahoo commented on FELIX-1210:
------------------------------

I definitely think I tested it on Equinox and KF. I don't have the jar file anymore to try now.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>             Fix For: felix-2.0.0
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Resolved: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-1210.
------------------------------------

      Assignee: Richard S. Hall
    Resolution: Fixed

I have committed a patch to trunk that appears to resolve this issue for the test case. I also modified the test case to use getEntry() to lookup missing directory entries to see if it did the correct thing. It all looks reasonable. Now the question is, does it add significant overhead to these methods?

Otherwise, please close if you are satisfied. Thanks.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>         Attachments: FELIX-1210.zip
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Updated: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-1210:
-----------------------------------

    Fix Version/s:     (was: felix-2.0.0)

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Commented: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718137#action_12718137 ] 

Richard S. Hall commented on FELIX-1210:
----------------------------------------

Looking a little closer, I guess it would be possible to do for getEntryPaths() without too much extra overhead, since this currently has to look through the entire JAR file anyway. We could run into issues with getEntry(), though, since getEntryPaths() will return directories entries that don't actually exist, so if those are passed into getEntry() it will fail. There will likely be some overhead to fix this issue, since it will require that we scan the JAR file to see if there are any entries with a matching directory.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>             Fix For: felix-2.0.0
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Commented: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739009#action_12739009 ] 

Richard S. Hall commented on FELIX-1210:
----------------------------------------

After looking at it some more, it is the case that synthesizing the directory entries would not be too costly, but doing so could make Bundle.getEntry() more costly, since it would be in a situation where it would need to scan the JAR file on misses to determine if the miss was actually a synthesized directory entry.

I am not too happy about creating such a containerism. For now, I will move this off the current road map, but leave the issue open.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Updated: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sahoo updated FELIX-1210:
-------------------------

    Attachment: FELIX-1210.zip

reproducible test case.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>         Attachments: FELIX-1210.zip
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Commented: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718131#action_12718131 ] 

Richard S. Hall commented on FELIX-1210:
----------------------------------------

Did you actually test this on KF and Equinox? I talked to Tom Watson and he did not say this was the case for Equinox.

>From my point of view, the cost on this would be too high. We would effectively have to read in the entire JAR file entry table first, since we have no idea where the entries might occur because they are not guaranteed to be in order.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>             Fix For: felix-2.0.0
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Updated: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-1210:
-----------------------------------

    Fix Version/s: felix-3.0.0

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>             Fix For: felix-3.0.0
>
>         Attachments: FELIX-1210.zip
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Commented: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718135#action_12718135 ] 

Richard S. Hall commented on FELIX-1210:
----------------------------------------

Ok, I was talking with Tom about this some more. Maybe the issue is slightly different. I will look into it when I have the time. Thanks.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>             Fix For: felix-2.0.0
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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


[jira] Commented: (FELIX-1210) Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839995#action_12839995 ] 

Sahoo commented on FELIX-1210:
------------------------------

As the attached test case shows, it is pretty easy to create jars with missing dir entries. e.g., the following jar command does not create dir entries for a/ and a/b/:

jar cvf foo.jar a/b/c.class.

I also confirm that Equinox is able to find those missing dir entries. If getEntryPaths does not report missing jar entries, how can one list all the entries of a bundle without having to explode the bundle? findEntries is not good enough as it includes contents from fragments.

> Allow jars with missing intermediate entries to be handled as if they were present in Bundle.getEntryPaths
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1210
>                 URL: https://issues.apache.org/jira/browse/FELIX-1210
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: generic
>            Reporter: Sahoo
>         Attachments: FELIX-1210.zip
>
>
> Refer to the entire discussion in users alias:
> http://markmail.org/message/hd6wp7c6agadr6al?q=how+to+iterate+entries+sahoo
> I think it will be good if Felix could tolerate the broken jar and return the entries just like KF and Equinox does, otherwise there is no way to iterate over all the entries of such a jar.

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