Use isEmpty().
diff --git a/core/src/main/java/org/apache/commons/digester3/Digester.java b/core/src/main/java/org/apache/commons/digester3/Digester.java
index 3994c24..de5de5a 100644
--- a/core/src/main/java/org/apache/commons/digester3/Digester.java
+++ b/core/src/main/java/org/apache/commons/digester3/Digester.java
@@ -2692,7 +2692,7 @@
             object = stackAction.onPush( this, null, object );
         }
 
-        if ( stack.size() == 0 )
+        if ( stack.isEmpty() )
         {
             root = object;
         }
diff --git a/core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java b/core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
index dde68d9..b681f86 100644
--- a/core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
+++ b/core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
@@ -389,7 +389,7 @@
                 // the rule passed to this object's constructor is included
                 // in the returned list of matching rules.
 
-                if ( ( match == null || match.size() == 0 ) )
+                if ( ( match == null || match.isEmpty() ) )
                 {
                     // The "real" rules class doesn't have any matches for
                     // the specified path, so we return a list containing