felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1326664 - /felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
Date Mon, 16 Apr 2012 15:59:38 GMT
Author: rickhall
Date: Mon Apr 16 15:59:38 2012
New Revision: 1326664

URL: http://svn.apache.org/viewvc?rev=1326664&view=rev
Log:
Apply patch (FELIX-3463) to fix a bug in fragment handling.

Modified:
    felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java

Modified: felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
URL: http://svn.apache.org/viewvc/felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java?rev=1326664&r1=1326663&r2=1326664&view=diff
==============================================================================
--- felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java (original)
+++ felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java Mon Apr 16
15:59:38 2012
@@ -757,13 +757,16 @@ class Candidates
                             {
                                 List<Capability> original = ((ShadowList) cands).getOriginal();
                                 int removeIdx = original.indexOf(origCap);
-                                original.remove(removeIdx);
+                                if (removeIdx != -1)
+                                {
+                                    original.remove(removeIdx);
+                                    cands.remove(removeIdx);
+                                }
                                 int insertIdx = rc.insertHostedCapability(
                                     original,
                                     new SimpleHostedCapability(
                                         hostResource.getDeclaredResource(),
                                         origCap));
-                                cands.remove(removeIdx);
                                 cands.add(insertIdx, c);
                             }
                             // If the original capability is from the host, then



Mime
View raw message