Author: davidb Date: Fri Apr 1 14:20:26 2016 New Revision: 1737395 URL: http://svn.apache.org/viewvc?rev=1737395&view=rev Log: FELIX-5231 Order Repositories in the order they are added
Patch applied on behalf of PK Søreide with many thanks. This closes #63 Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java?rev=1737395&r1=1737394&r2=1737395&view=diff ============================================================================== --- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java (original) +++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java Fri Apr 1 14:20:26 2016 @@ -26,15 +26,16 @@ import java.security.PrivilegedException import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import org.apache.felix.bundlerepository.Capability; import org.apache.felix.bundlerepository.DataModelHelper; -import org.apache.felix.bundlerepository.Requirement; import org.apache.felix.bundlerepository.Repository; +import org.apache.felix.bundlerepository.RepositoryAdmin; +import org.apache.felix.bundlerepository.Requirement; import org.apache.felix.bundlerepository.Resolver; import org.apache.felix.bundlerepository.Resource; import org.apache.felix.utils.collections.MapToDictionary; @@ -42,8 +43,6 @@ import org.apache.felix.utils.log.Logger import org.osgi.framework.BundleContext; import org.osgi.framework.Filter; import org.osgi.framework.InvalidSyntaxException; -import org.apache.felix.bundlerepository.Repository; -import org.apache.felix.bundlerepository.RepositoryAdmin; public class RepositoryAdminImpl implements RepositoryAdmin { @@ -52,7 +51,7 @@ public class RepositoryAdminImpl impleme private final SystemRepositoryImpl m_system; private final LocalRepositoryImpl m_local; private final DataModelHelper m_helper = new DataModelHelperImpl(); - private Map m_repoMap = new HashMap(); + private Map m_repoMap = new LinkedHashMap(); private boolean m_initialized = false; // Reusable comparator for sorting resources by name.