felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1029716 - /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Date Mon, 01 Nov 2010 15:42:54 GMT
Author: rickhall
Date: Mon Nov  1 15:42:54 2010
New Revision: 1029716

URL: http://svn.apache.org/viewvc?rev=1029716&view=rev
Log:
Align with trunk.

Modified:
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java?rev=1029716&r1=1029715&r2=1029716&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Mon Nov  1 15:42:54 2010
@@ -52,9 +52,6 @@ public class Proto3Resolver implements R
 // TODO: FELIX3 - REMOVE INVOKE COUNTS
     private static boolean m_isInvokeCount = false;
 
-    // Reusable empty array.
-    private static final List<Wire> m_emptyWires = Util.m_emptyList;
-
     // Holds candidate permutations based on permutating "uses" chains.
     // These permutations are given higher priority.
     private final List<Map<Requirement, Set<Capability>>> m_usesPermutations
=
@@ -274,7 +271,7 @@ System.out.println("+++ PACKAGE SPACES E
         // If the module doesn't have dynamic imports, then just return
         // immediately.
         List<Requirement> dynamics = module.getDynamicRequirements();
-        if ((dynamics == null) || (dynamics.size() == 0))
+        if ((dynamics == null) || dynamics.isEmpty())
         {
             return null;
         }
@@ -495,7 +492,7 @@ System.out.println("+++ PACKAGE SPACES E
             // If there are no candidates for the current requirement
             // and it is not optional, then create, cache, and throw
             // a resolve exception.
-            if ((candidates.size() == 0) && !req.isOptional())
+            if (candidates.isEmpty() && !req.isOptional())
             {
                 String msg = "Unable to resolve " + module
                     + ": missing requirement " + req;
@@ -575,7 +572,7 @@ System.out.println("+++ PACKAGE SPACES E
             }
         }
 
-        if (candidates.size() == 0)
+        if (candidates.isEmpty())
         {
             candidateMap.remove(dynReq);
             if (rethrow == null)
@@ -1368,7 +1365,7 @@ System.out.println("+++ PACKAGE SPACES E
             return sources;
         }
 
-        return Util.m_emptyList;
+        return Collections.EMPTY_LIST;
     }
 
     private static List<Capability> getPackageSourcesInternal(
@@ -1457,7 +1454,7 @@ System.out.println("+++ PACKAGE SPACES E
 
         if (!module.isResolved() && !wireMap.containsKey(module))
         {
-            wireMap.put(module, m_emptyWires);
+            wireMap.put(module, (List<Wire>) Collections.EMPTY_LIST);
 
             List<Wire> packageWires = new ArrayList<Wire>();
             List<Wire> moduleWires = new ArrayList<Wire>();
@@ -1516,7 +1513,7 @@ System.out.println("+++ PACKAGE SPACES E
             m_invokeCounts.put(methodName, count);
         }
 
-        wireMap.put(module, m_emptyWires);
+        wireMap.put(module, (List<Wire>) Collections.EMPTY_LIST);
 
         List<Wire> packageWires = new ArrayList<Wire>();
 



Mime
View raw message