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 2011/04/27 14:32:03 UTC
[jira] [Created] (FELIX-2935) Bundle.getEntryPaths and findEntries
are returning META-INF/ multiple times
Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
---------------------------------------------------------------------------
Key: FELIX-2935
URL: https://issues.apache.org/jira/browse/FELIX-2935
Project: Felix
Issue Type: Bug
Components: Framework
Affects Versions: framework-3.0.8
Reporter: Sahoo
Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
My code looks like this:
void printEntryPaths(Bundle b, String s) {
Enumeration e = b.getEntryPaths(s);
if (e!=null) {
while (e.hasMoreElements()) {
String next = (String)e.nextElement();
System.out.println(next);
printEntryPaths(b, next);
}
}
}
void printEntryPaths2(Bundle b, String s) {
Enumeration e = b.findEntries(s, "*", true);
if (e != null) {
while (e.hasMoreElements()) {
URL next = (URL)e.nextElement();
System.out.println(next.getPath());
}
}
}
This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-2935) Bundle.getEntryPaths and findEntries
are returning META-INF/ multiple times
Posted by "Sahoo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sahoo updated FELIX-2935:
-------------------------
Attachment: FELIX-2935.zip
Unzip. See README for simple instructions to test.
> Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
> ---------------------------------------------------------------------------
>
> Key: FELIX-2935
> URL: https://issues.apache.org/jira/browse/FELIX-2935
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-3.0.8
> Reporter: Sahoo
> Attachments: FELIX-2935.zip
>
>
> Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
> My code looks like this:
> void printEntryPaths(Bundle b, String s) {
> Enumeration e = b.getEntryPaths(s);
> if (e!=null) {
> while (e.hasMoreElements()) {
> String next = (String)e.nextElement();
> System.out.println(next);
> printEntryPaths(b, next);
> }
> }
> }
> void printEntryPaths2(Bundle b, String s) {
> Enumeration e = b.findEntries(s, "*", true);
> if (e != null) {
> while (e.hasMoreElements()) {
> URL next = (URL)e.nextElement();
> System.out.println(next.getPath());
> }
> }
> }
> This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-2935) Bundle.getEntryPaths and findEntries
are returning META-INF/ multiple times
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall updated FELIX-2935:
-----------------------------------
Fix Version/s: framework-4.0.0
> Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
> ---------------------------------------------------------------------------
>
> Key: FELIX-2935
> URL: https://issues.apache.org/jira/browse/FELIX-2935
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-3.0.8
> Reporter: Sahoo
> Fix For: framework-4.0.0
>
> Attachments: FELIX-2935.zip
>
>
> Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
> My code looks like this:
> void printEntryPaths(Bundle b, String s) {
> Enumeration e = b.getEntryPaths(s);
> if (e!=null) {
> while (e.hasMoreElements()) {
> String next = (String)e.nextElement();
> System.out.println(next);
> printEntryPaths(b, next);
> }
> }
> }
> void printEntryPaths2(Bundle b, String s) {
> Enumeration e = b.findEntries(s, "*", true);
> if (e != null) {
> while (e.hasMoreElements()) {
> URL next = (URL)e.nextElement();
> System.out.println(next.getPath());
> }
> }
> }
> This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (FELIX-2935) Bundle.getEntryPaths and findEntries
are returning META-INF/ multiple times
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall resolved FELIX-2935.
------------------------------------
Resolution: Fixed
Assignee: Richard S. Hall
Committed a patch. Please close this issue if satisfied, thanks.
> Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
> ---------------------------------------------------------------------------
>
> Key: FELIX-2935
> URL: https://issues.apache.org/jira/browse/FELIX-2935
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-3.0.8
> Reporter: Sahoo
> Assignee: Richard S. Hall
> Fix For: framework-4.0.0
>
> Attachments: FELIX-2935.zip
>
>
> Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
> My code looks like this:
> void printEntryPaths(Bundle b, String s) {
> Enumeration e = b.getEntryPaths(s);
> if (e!=null) {
> while (e.hasMoreElements()) {
> String next = (String)e.nextElement();
> System.out.println(next);
> printEntryPaths(b, next);
> }
> }
> }
> void printEntryPaths2(Bundle b, String s) {
> Enumeration e = b.findEntries(s, "*", true);
> if (e != null) {
> while (e.hasMoreElements()) {
> URL next = (URL)e.nextElement();
> System.out.println(next.getPath());
> }
> }
> }
> This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-2935) Bundle.getEntryPaths and
findEntries are returning META-INF/ multiple times
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025854#comment-13025854 ]
Richard S. Hall commented on FELIX-2935:
----------------------------------------
This is what I see:
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.8)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.8.0)
3|Active | 1|Apache Felix Gogo Runtime (0.8.0)
4|Active | 1|Apache Felix Gogo Shell (0.8.0)
5|Installed | 1|print-bundle-entries (1.0.0.SNAPSHOT)
g! start 5
Foo() called
sahoo.osgitest1.Foo@13e58d4.start()
Installed rfc143.test4 [6]
Using printEntryPaths
META-INF/
META-INF/MANIFEST.MF
index.html
WEB-INF/
WEB-INF/lib/
WEB-INF/lib/entities1-osgi.jar
Using printEntryPaths2
/META-INF/
/META-INF/MANIFEST.MF
/index.html
/WEB-INF/
/WEB-INF/lib/
/WEB-INF/lib/entities1-osgi.jar
Uninstalled rfc143.test4 [6]
g!
What should I be seeing? Maybe it is platform specific.
> Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
> ---------------------------------------------------------------------------
>
> Key: FELIX-2935
> URL: https://issues.apache.org/jira/browse/FELIX-2935
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-3.0.8
> Reporter: Sahoo
> Attachments: FELIX-2935.zip
>
>
> Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
> My code looks like this:
> void printEntryPaths(Bundle b, String s) {
> Enumeration e = b.getEntryPaths(s);
> if (e!=null) {
> while (e.hasMoreElements()) {
> String next = (String)e.nextElement();
> System.out.println(next);
> printEntryPaths(b, next);
> }
> }
> }
> void printEntryPaths2(Bundle b, String s) {
> Enumeration e = b.findEntries(s, "*", true);
> if (e != null) {
> while (e.hasMoreElements()) {
> URL next = (URL)e.nextElement();
> System.out.println(next.getPath());
> }
> }
> }
> This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-2935) Bundle.getEntryPaths and findEntries
are returning META-INF/ multiple times
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall updated FELIX-2935:
-----------------------------------
Fix Version/s: (was: framework-4.0.0)
framework-3.2.2
> Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
> ---------------------------------------------------------------------------
>
> Key: FELIX-2935
> URL: https://issues.apache.org/jira/browse/FELIX-2935
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-3.0.8
> Reporter: Sahoo
> Assignee: Richard S. Hall
> Fix For: framework-3.2.2
>
> Attachments: FELIX-2935.zip
>
>
> Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
> My code looks like this:
> void printEntryPaths(Bundle b, String s) {
> Enumeration e = b.getEntryPaths(s);
> if (e!=null) {
> while (e.hasMoreElements()) {
> String next = (String)e.nextElement();
> System.out.println(next);
> printEntryPaths(b, next);
> }
> }
> }
> void printEntryPaths2(Bundle b, String s) {
> Enumeration e = b.findEntries(s, "*", true);
> if (e != null) {
> while (e.hasMoreElements()) {
> URL next = (URL)e.nextElement();
> System.out.println(next.getPath());
> }
> }
> }
> This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-2935) Bundle.getEntryPaths and
findEntries are returning META-INF/ multiple times
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026308#comment-13026308 ]
Richard S. Hall commented on FELIX-2935:
----------------------------------------
After some investigation, I determined that this bug is actually happening and that it occurs when a directory entry in the JAR appears after an entry in the directory. Duplicate bug FELIX-2940 has a pretty good explanation.
> Bundle.getEntryPaths and findEntries are returning META-INF/ multiple times
> ---------------------------------------------------------------------------
>
> Key: FELIX-2935
> URL: https://issues.apache.org/jira/browse/FELIX-2935
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-3.0.8
> Reporter: Sahoo
> Fix For: framework-4.0.0
>
> Attachments: FELIX-2935.zip
>
>
> Bundle.getEntryPaths("/") and Bundle.findEntries("/", "*", true) return META-INF/ twice. There is no fragment attached, so there is no reason for findEntries to return twice.
> My code looks like this:
> void printEntryPaths(Bundle b, String s) {
> Enumeration e = b.getEntryPaths(s);
> if (e!=null) {
> while (e.hasMoreElements()) {
> String next = (String)e.nextElement();
> System.out.println(next);
> printEntryPaths(b, next);
> }
> }
> }
> void printEntryPaths2(Bundle b, String s) {
> Enumeration e = b.findEntries(s, "*", true);
> if (e != null) {
> while (e.hasMoreElements()) {
> URL next = (URL)e.nextElement();
> System.out.println(next.getPath());
> }
> }
> }
> This seems to be a regression.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira