james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From man...@apache.org
Subject svn commit: r901654 - /james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
Date Thu, 21 Jan 2010 11:07:27 GMT
Author: manolo
Date: Thu Jan 21 11:07:26 2010
New Revision: 901654

URL: http://svn.apache.org/viewvc?rev=901654&view=rev
Log:
removed dead code because split method returns at least one element

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java?rev=901654&r1=901653&r2=901654&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
Thu Jan 21 11:07:26 2010
@@ -66,13 +66,9 @@
             if (text.replaceAll("[,:\\s]+", "").isEmpty())
                 return false;
             String[] addresses = text.split("[,;\r\n]+");
-            if (addresses == null || addresses.length == 0) {
-                return isValidAddress(text.trim());
-            } else {
-                for (int i = 0; i < addresses.length; i++) {
-                    if (!addresses[i].trim().isEmpty() && isValidAddress(addresses[i])
== false) {
-                        return false;
-                    }
+            for (int i = 0; i < addresses.length; i++) {
+                if (!addresses[i].trim().isEmpty() && isValidAddress(addresses[i])
== false) {
+                    return false;
                 }
             }
         }



---------------------------------------------------------------------
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