james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1092739 - /james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/matchers/And.java
Date Fri, 15 Apr 2011 15:22:51 GMT
Author: felixk
Date: Fri Apr 15 15:22:51 2011
New Revision: 1092739

URL: http://svn.apache.org/viewvc?rev=1092739&view=rev
Log:
"result" is known to be not null at this stage

Modified:
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/matchers/And.java

Modified: james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/matchers/And.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/matchers/And.java?rev=1092739&r1=1092738&r2=1092739&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/matchers/And.java
(original)
+++ james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/matchers/And.java
Fri Apr 15 15:22:51 2011
@@ -73,29 +73,25 @@ public class And extends GenericComposit
                 // collection, then it contains the same recipients
                 // so we can short-circuit building the AND of the two
                 if (finalResult != result) {
-                    if (result != null) {
-                        // the two results are different collections, so we AND
-                        // them
-                        // Ensure that the finalResult only contains recipients
-                        // in the result collection
-                        Collection newResult = new ArrayList();
-                        MailAddress recipient = null;
-                        for (Iterator i = finalResult.iterator(); i.hasNext();) {
-                            recipient = (MailAddress) i.next();
-                            // log("recipient="+recipient.toString());
-                            if (result.contains(recipient)) {
-                                newResult.add(recipient);
-                            }
+                    // the two results are different collections, so we AND
+                    // them
+                    // Ensure that the finalResult only contains recipients
+                    // in the result collection
+                    Collection newResult = new ArrayList();
+                    MailAddress recipient = null;
+                    for (Iterator i = finalResult.iterator(); i.hasNext();) {
+                        recipient = (MailAddress) i.next();
+                        // log("recipient="+recipient.toString());
+                        if (result.contains(recipient)) {
+                            newResult.add(recipient);
                         }
-                        recipient = null;
-                        // basically the finalResult gets replaced with a
-                        // smaller result
-                        // otherwise finalResult would have been equal to result
-                        // (in all cases)
-                        finalResult = newResult;
-                    } else {
-                        finalResult = result;
                     }
+                    recipient = null;
+                    // basically the finalResult gets replaced with a
+                    // smaller result
+                    // otherwise finalResult would have been equal to result
+                    // (in all cases)
+                    finalResult = newResult;
                 }
             }
             result = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message