Use isEmpty().


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@995193 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 5102e64..4ca7f7f 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -4103,7 +4103,7 @@
             // 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 false;
             }
@@ -4140,12 +4140,7 @@
                 module, Capability.PACKAGE_NAMESPACE, dirs, attrs);
             Set<Capability> candidates = m_resolverState.getCandidates(module, req, false);
 
-            if (candidates.size() == 0)
-            {
-                return false;
-            }
-
-            return true;
+            return !candidates.isEmpty();
         }
 
         private void markResolvedModules(Map<Module, List<Wire>> wireMap)
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java b/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
index da666c7..d98aa5a 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
@@ -233,7 +233,7 @@
         // 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;
         }
@@ -446,7 +446,7 @@
             // 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;
@@ -518,7 +518,7 @@
             }
         }
 
-        if (candidates.size() == 0)
+        if (candidates.isEmpty())
         {
             candidateMap.remove(dynReq);
             if (rethrow == null)