james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ieu...@apache.org
Subject svn commit: r1299464 - /james/server/trunk/data-api/src/test/java/org/apache/james/domainlist/api/mock/SimpleDomainList.java
Date Sun, 11 Mar 2012 22:18:52 GMT
Author: ieugen
Date: Sun Mar 11 22:18:51 2012
New Revision: 1299464

URL: http://svn.apache.org/viewvc?rev=1299464&view=rev
Log:
JAMES-1393

- added @Override and reformated code
Issue #JAMES-1393 - Upgrate all test suites to junit 4.10

Modified:
    james/server/trunk/data-api/src/test/java/org/apache/james/domainlist/api/mock/SimpleDomainList.java

Modified: james/server/trunk/data-api/src/test/java/org/apache/james/domainlist/api/mock/SimpleDomainList.java
URL: http://svn.apache.org/viewvc/james/server/trunk/data-api/src/test/java/org/apache/james/domainlist/api/mock/SimpleDomainList.java?rev=1299464&r1=1299463&r2=1299464&view=diff
==============================================================================
--- james/server/trunk/data-api/src/test/java/org/apache/james/domainlist/api/mock/SimpleDomainList.java
(original)
+++ james/server/trunk/data-api/src/test/java/org/apache/james/domainlist/api/mock/SimpleDomainList.java
Sun Mar 11 22:18:51 2012
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-
 package org.apache.james.domainlist.api.mock;
 
 import java.util.LinkedList;
@@ -29,29 +28,36 @@ import org.apache.james.domainlist.api.D
  * Simplest implementation for ManageableDomainList
  */
 public class SimpleDomainList implements DomainList {
+
     private List<String> domains = new LinkedList<String>();
 
+    @Override
     public boolean containsDomain(String domain) throws DomainListException {
-        return domains.contains(domain);
+	return domains.contains(domain);
     }
 
+    @Override
     public String[] getDomains() throws DomainListException {
-        return domains.toArray(new String[domains.size()]);
+	return domains.toArray(new String[domains.size()]);
     }
 
+    @Override
     public void addDomain(String domain) throws DomainListException {
-        if (domains.contains(domain))
-            throw new DomainListException("Domain " + domain + " already exist");
-        domains.add(domain);
+	if (domains.contains(domain)) {
+	    throw new DomainListException("Domain " + domain + " already exist");
+	}
+	domains.add(domain);
     }
 
+    @Override
     public void removeDomain(String domain) throws DomainListException {
-        if (domains.remove(domain) == false) {
-            throw new DomainListException("Domain " + domain + " does not exist");
-        }
+	if (domains.remove(domain) == false) {
+	    throw new DomainListException("Domain " + domain + " does not exist");
+	}
     }
 
+    @Override
     public String getDefaultDomain() {
-        return "localhost";
+	return "localhost";
     }
 }
\ No newline at end of file



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