Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 25076 Details for
Bug 104477
ClassLoader returns an Enumeration of only the first instance of a resouce under OSGi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed backport to R3_1_maintenance branch
104477_org.eclipse.osgi.patch (text/plain), 2.83 KB, created by
Thomas Watson
on 2005-07-20 14:59:53 EDT
(
hide
)
Description:
Proposed backport to R3_1_maintenance branch
Filename:
MIME Type:
Creator:
Thomas Watson
Created:
2005-07-20 14:59:53 EDT
Size:
2.83 KB
patch
obsolete
>Index: core/framework/org/eclipse/osgi/framework/internal/core/BundleLoader.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleLoader.java,v >retrieving revision 1.68 >diff -u -r1.68 BundleLoader.java >--- core/framework/org/eclipse/osgi/framework/internal/core/BundleLoader.java 9 Jun 2005 15:30:49 -0000 1.68 >+++ core/framework/org/eclipse/osgi/framework/internal/core/BundleLoader.java 20 Jul 2005 18:56:14 -0000 >@@ -532,6 +532,18 @@ > // 5) search the local bundle > if (result == null) > result = findLocalResources(name); >+ else { >+ //compound the required source results with the local ones >+ Enumeration localResults = findLocalResources(name); >+ if (localResults != null) { >+ Vector compoundResults = new Vector(); >+ while (result.hasMoreElements()) >+ compoundResults.add(result.nextElement()); >+ while (localResults.hasMoreElements()) >+ compoundResults.add(localResults.nextElement()); >+ result = compoundResults.elements(); >+ } >+ } > if (result != null) > return result; > // 6) attempt to find a dynamic import source >Index: core/framework/org/eclipse/osgi/framework/internal/core/MultiSourcePackage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/MultiSourcePackage.java,v >retrieving revision 1.8 >diff -u -r1.8 MultiSourcePackage.java >--- core/framework/org/eclipse/osgi/framework/internal/core/MultiSourcePackage.java 7 Mar 2005 00:48:08 -0000 1.8 >+++ core/framework/org/eclipse/osgi/framework/internal/core/MultiSourcePackage.java 20 Jul 2005 18:56:14 -0000 >@@ -12,6 +12,7 @@ > > import java.net.URL; > import java.util.Enumeration; >+import java.util.Vector; > > public class MultiSourcePackage extends PackageSource { > SingleSourcePackage[] suppliers; >@@ -46,12 +47,24 @@ > } > > public Enumeration getResources(String name) { >- Enumeration result = null; >+ Enumeration firstResult = null; >+ Vector compoundResults = null; > for (int i = 0; i < suppliers.length; i++) { >- result = suppliers[i].getResources(name); >- if (result != null) >- return result; >+ Enumeration resources = suppliers[i].getResources(name); >+ if (resources != null) { >+ if (firstResult == null) >+ firstResult = resources; >+ else { >+ if (compoundResults == null) { >+ compoundResults = new Vector(); >+ while (firstResult.hasMoreElements()) >+ compoundResults.add(firstResult.nextElement()); >+ } >+ while (resources.hasMoreElements()) >+ compoundResults.add(resources.nextElement()); >+ } >+ } > } >- return result; >+ return compoundResults == null ? firstResult : compoundResults.elements(); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 104477
:
25035
| 25076