http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraNotificationRegistryTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraNotificationRegistryTest.java b/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraNotificationRegistryTest.java index 1ef9edf..aada43c 100644 --- a/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraNotificationRegistryTest.java +++ b/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraNotificationRegistryTest.java @@ -34,6 +34,7 @@ public class CassandraNotificationRegistryTest extends AbstractNotificationRegis private CassandraCluster cassandra; + @Override @Before public void setUp() throws Exception { cassandra = CassandraCluster.create(new CassandraNotificationRegistryModule(), cassandraServer.getIp(), cassandraServer.getBindingPort());
http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraVacationRepositoryTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraVacationRepositoryTest.java b/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraVacationRepositoryTest.java index 788790b..0fbe8b8 100644 --- a/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraVacationRepositoryTest.java +++ b/server/data/data-jmap-cassandra/src/test/java/org/apache/james/jmap/cassandra/vacation/CassandraVacationRepositoryTest.java @@ -35,6 +35,7 @@ public class CassandraVacationRepositoryTest extends AbstractVacationRepositoryT private CassandraCluster cassandra; + @Override @Before public void setUp() throws Exception { CassandraModuleComposite module = new CassandraModuleComposite(new CassandraVacationModule(), new CassandraZonedDateTimeModule()); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jmap/src/test/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepositoryTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-jmap/src/test/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepositoryTest.java b/server/data/data-jmap/src/test/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepositoryTest.java index 9c32627..c63b460 100644 --- a/server/data/data-jmap/src/test/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepositoryTest.java +++ b/server/data/data-jmap/src/test/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepositoryTest.java @@ -25,6 +25,7 @@ import org.junit.Before; public class MemoryAccessTokenRepositoryTest extends AccessTokenRepositoryTest { + @Override @Before public void setUp() throws Exception { super.setUp(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java ---------------------------------------------------------------------- diff --git a/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java b/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java index c7c3550..0f7a339 100644 --- a/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java +++ b/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java @@ -74,11 +74,7 @@ public class JPARecipientRewriteTable extends AbstractRecipientRewriteTable { } } - /** - * @throws RecipientRewriteTableException - * @see org.apache.james.rrt.lib.AbstractRecipientRewriteTable#mapAddressInternal(java.lang.String, - * java.lang.String) - */ + @Override protected String mapAddressInternal(String user, String domain) throws RecipientRewriteTableException { String mapping = getMapping(user, domain, "selectExactMappings"); if (mapping != null) { @@ -110,10 +106,7 @@ public class JPARecipientRewriteTable extends AbstractRecipientRewriteTable { return null; } - /** - * @throws RecipientRewriteTableException - * @see org.apache.james.rrt.lib.AbstractRecipientRewriteTable#mapAddress(java.lang.String, java.lang.String) - */ + @Override protected Mappings getUserDomainMappingsInternal(String user, String domain) throws RecipientRewriteTableException { EntityManager entityManager = entityManagerFactory.createEntityManager(); final EntityTransaction transaction = entityManager.getTransaction(); @@ -138,10 +131,7 @@ public class JPARecipientRewriteTable extends AbstractRecipientRewriteTable { return null; } - /** - * @throws RecipientRewriteTableException - * @see org.apache.james.rrt.lib.AbstractRecipientRewriteTable#getAllMappingsInternal() - */ + @Override protected Map<String, Mappings> getAllMappingsInternal() throws RecipientRewriteTableException { EntityManager entityManager = entityManagerFactory.createEntityManager(); final EntityTransaction transaction = entityManager.getTransaction(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/JPAUsersRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/JPAUsersRepository.java b/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/JPAUsersRepository.java index e623ddf..cfe981c 100644 --- a/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/JPAUsersRepository.java +++ b/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/JPAUsersRepository.java @@ -79,6 +79,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * * @since James 1.2.2 */ + @Override public User getUserByName(String name) throws UsersRepositoryException { EntityManager entityManager = entityManagerFactory.createEntityManager(); @@ -117,6 +118,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * * @throws UsersRepositoryException */ + @Override public void updateUser(User user) throws UsersRepositoryException { EntityManager entityManager = entityManagerFactory.createEntityManager(); @@ -148,6 +150,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * the user to remove from the repository * @throws UsersRepositoryException */ + @Override public void removeUser(String name) throws UsersRepositoryException { EntityManager entityManager = entityManagerFactory.createEntityManager(); @@ -179,6 +182,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * @return whether the user is in the repository * @throws UsersRepositoryException */ + @Override public boolean contains(String name) throws UsersRepositoryException { EntityManager entityManager = entityManagerFactory.createEntityManager(); @@ -207,6 +211,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * * @since James 1.2.2 */ + @Override public boolean test(String name, String password) throws UsersRepositoryException { final User user = getUserByName(name); final boolean result; @@ -220,6 +225,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * @return the number of users in the repository * @throws UsersRepositoryException */ + @Override public int countUsers() throws UsersRepositoryException { EntityManager entityManager = entityManagerFactory.createEntityManager(); @@ -240,6 +246,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { * repository. * @throws UsersRepositoryException */ + @Override @SuppressWarnings("unchecked") public Iterator<String> list() throws UsersRepositoryException { EntityManager entityManager = entityManagerFactory.createEntityManager(); @@ -255,10 +262,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { } } - /** - * @see - * org.apache.james.user.lib.AbstractUsersRepository#doConfigure(org.apache.commons.configuration.HierarchicalConfiguration) - */ + @Override public void doConfigure(HierarchicalConfiguration config) throws ConfigurationException { algo = config.getString("algorithm", "MD5"); super.doConfigure(config); @@ -273,10 +277,7 @@ public class JPAUsersRepository extends AbstractUsersRepository { return entityManagerFactory.createEntityManager(); } - /** - * @see - * org.apache.james.user.lib.AbstractUsersRepository#doAddUser(java.lang.String, java.lang.String) - */ + @Override protected void doAddUser(String username, String password) throws UsersRepositoryException { String lowerCasedUsername = username.toLowerCase(Locale.US); if (contains(lowerCasedUsername)) { http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java ---------------------------------------------------------------------- diff --git a/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java b/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java index 2634bc3..c7bca5d 100644 --- a/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java +++ b/server/data/data-jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java @@ -94,16 +94,12 @@ public class JPAUser implements User { this.password = hashPassword(userName, password, alg); } - /** - * @see org.apache.james.user.api.model.User#getUserName() - */ + @Override public String getUserName() { return name; } - /** - * @see org.apache.james.user.api.model.User#setPassword(java.lang.String) - */ + @Override public boolean setPassword(String newPass) { final boolean result; if (newPass == null) { @@ -115,9 +111,7 @@ public class JPAUser implements User { return result; } - /** - * @see org.apache.james.user.api.model.User#verifyPassword(java.lang.String) - */ + @Override public boolean verifyPassword(String pass) { final boolean result; if (pass == null) { http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jpa/src/test/java/org/apache/james/domainlist/jpa/JPADomainListTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-jpa/src/test/java/org/apache/james/domainlist/jpa/JPADomainListTest.java b/server/data/data-jpa/src/test/java/org/apache/james/domainlist/jpa/JPADomainListTest.java index 4a79542..1527e65 100644 --- a/server/data/data-jpa/src/test/java/org/apache/james/domainlist/jpa/JPADomainListTest.java +++ b/server/data/data-jpa/src/test/java/org/apache/james/domainlist/jpa/JPADomainListTest.java @@ -32,6 +32,7 @@ public class JPADomainListTest extends AbstractDomainListTest { private static final JpaTestCluster JPA_TEST_CLUSTER = JpaTestCluster.create(JPADomain.class); + @Override @Before public void setUp() throws Exception { super.setUp(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPARecipientRewriteTableTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPARecipientRewriteTableTest.java b/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPARecipientRewriteTableTest.java index 523356a..85ad4f3 100644 --- a/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPARecipientRewriteTableTest.java +++ b/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPARecipientRewriteTableTest.java @@ -34,11 +34,13 @@ public class JPARecipientRewriteTableTest extends AbstractRecipientRewriteTableT private static final JpaTestCluster JPA_TEST_CLUSTER = JpaTestCluster.create(JPARecipientRewrite.class); + @Override @Before public void setUp() throws Exception { super.setUp(); } + @Override @After public void tearDown() throws Exception { super.tearDown(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-jpa/src/test/java/org/apache/james/user/jpa/JpaUsersRepositoryTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-jpa/src/test/java/org/apache/james/user/jpa/JpaUsersRepositoryTest.java b/server/data/data-jpa/src/test/java/org/apache/james/user/jpa/JpaUsersRepositoryTest.java index ac298f3..6a0d1d6 100644 --- a/server/data/data-jpa/src/test/java/org/apache/james/user/jpa/JpaUsersRepositoryTest.java +++ b/server/data/data-jpa/src/test/java/org/apache/james/user/jpa/JpaUsersRepositoryTest.java @@ -36,6 +36,7 @@ public class JpaUsersRepositoryTest extends AbstractUsersRepositoryTest { super.setUp(); } + @Override @After public void tearDown() throws Exception { super.tearDown(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java ---------------------------------------------------------------------- diff --git a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java index 9156016..8cf8c03 100644 --- a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java +++ b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java @@ -107,6 +107,7 @@ public class ReadOnlyLDAPUser implements User, Serializable { * * @return The user's identifier or name. */ + @Override public String getUserName() { return userName; } @@ -119,6 +120,7 @@ public class ReadOnlyLDAPUser implements User, Serializable { * * @return <code>False</code> */ + @Override public boolean setPassword(String newPass) { return false; } @@ -134,6 +136,7 @@ public class ReadOnlyLDAPUser implements User, Serializable { * to the LDAP host using the user's id and the supplied password, * and <code>False</code> otherwise. */ + @Override public boolean verifyPassword(String password) { boolean result = false; LdapContext ldapContext = null; http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java index 5548ec6..8190c5b 100644 --- a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java +++ b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java @@ -355,6 +355,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl * @param configuration * An encapsulation of the James server configuration data. */ + @Override public void configure(HierarchicalConfiguration configuration) throws ConfigurationException { ldapHost = configuration.getString("[@ldapHost]", ""); principal = configuration.getString("[@principal]", ""); @@ -628,9 +629,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl return new ReadOnlyLDAPUser(userName.get().toString(), userDN, ldapContext); } - /** - * @see UsersRepository#contains(java.lang.String) - */ + @Override public boolean contains(String name) throws UsersRepositoryException { return getUserByName(name) != null; } @@ -645,9 +644,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl return getUserByNameCaseInsensitive(name) != null; } - /** - * @see UsersRepository#countUsers() - */ + @Override public int countUsers() throws UsersRepositoryException { try { return getValidUsers().size(); @@ -673,9 +670,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl return null; } - /** - * @see UsersRepository#getUserByName(java.lang.String) - */ + @Override public User getUserByName(String name) throws UsersRepositoryException { try { return searchAndBuildUser(name); @@ -708,9 +703,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl return null; } - /** - * @see UsersRepository#list() - */ + @Override public Iterator<String> list() throws UsersRepositoryException { try { return buildUserCollection(getValidUsers()) @@ -748,9 +741,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl return validUserDNs; } - /** - * @see UsersRepository#removeUser(java.lang.String) - */ + @Override public void removeUser(String name) throws UsersRepositoryException { LOGGER.warn("This user-repository is read-only. Modifications are not permitted."); throw new UsersRepositoryException( @@ -758,25 +749,20 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl } - /** - * @see UsersRepository#test(java.lang.String, java.lang.String) - */ + @Override public boolean test(String name, String password) throws UsersRepositoryException { User u = getUserByName(name); return u != null && u.verifyPassword(password); } - /** - * @see UsersRepository#addUser(java.lang.String, java.lang.String) - */ + @Override public void addUser(String username, String password) throws UsersRepositoryException { LOGGER.error("This user-repository is read-only. Modifications are not permitted."); throw new UsersRepositoryException( "This user-repository is read-only. Modifications are not permitted."); } - /** - */ + @Override public void updateUser(User user) throws UsersRepositoryException { LOGGER.error("This user-repository is read-only. Modifications are not permitted."); throw new UsersRepositoryException( @@ -786,6 +772,7 @@ public class ReadOnlyUsersLDAPRepository implements UsersRepository, Configurabl /** * VirtualHosting not supported */ + @Override public boolean supportVirtualHosting() { return supportsVirtualHosting; } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/mailrepository/lib/AbstractMailRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/mailrepository/lib/AbstractMailRepository.java b/server/data/data-library/src/main/java/org/apache/james/mailrepository/lib/AbstractMailRepository.java index 8f82041..b00bcac 100644 --- a/server/data/data-library/src/main/java/org/apache/james/mailrepository/lib/AbstractMailRepository.java +++ b/server/data/data-library/src/main/java/org/apache/james/mailrepository/lib/AbstractMailRepository.java @@ -55,6 +55,7 @@ public abstract class AbstractMailRepository implements MailRepository, Configur */ private final Lock lock = new Lock(); + @Override public void configure(HierarchicalConfiguration configuration) throws ConfigurationException { doConfigure(configuration); } @@ -71,6 +72,7 @@ public abstract class AbstractMailRepository implements MailRepository, Configur * * @return true if successfully released the lock, false otherwise */ + @Override public boolean unlock(String key) { return lock.unlock(key); } @@ -83,13 +85,12 @@ public abstract class AbstractMailRepository implements MailRepository, Configur * * @return true if successfully obtained the lock, false otherwise */ + @Override public boolean lock(String key) { return lock.lock(key); } - /** - * @see org.apache.james.mailrepository.api.MailRepository#store(Mail) - */ + @Override public void store(Mail mc) throws MessagingException { boolean wasLocked = true; String key = mc.getName(); @@ -124,25 +125,19 @@ public abstract class AbstractMailRepository implements MailRepository, Configur */ protected abstract void internalStore(Mail mc) throws MessagingException, IOException; - /** - * @see org.apache.james.mailrepository.api.MailRepository#remove(Mail) - */ + @Override public void remove(Mail mail) throws MessagingException { remove(mail.getName()); } - /** - * @see org.apache.james.mailrepository.api.MailRepository#remove(Collection) - */ + @Override public void remove(Collection<Mail> mails) throws MessagingException { for (Mail mail : mails) { remove(mail); } } - /** - * @see org.apache.james.mailrepository.api.MailRepository#remove(String) - */ + @Override public void remove(String key) throws MessagingException { if (lock(key)) { try { http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/repository/file/AbstractFileRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/repository/file/AbstractFileRepository.java b/server/data/data-library/src/main/java/org/apache/james/repository/file/AbstractFileRepository.java index 8dab01f..fcdb5d5 100644 --- a/server/data/data-library/src/main/java/org/apache/james/repository/file/AbstractFileRepository.java +++ b/server/data/data-library/src/main/java/org/apache/james/repository/file/AbstractFileRepository.java @@ -66,6 +66,7 @@ public abstract class AbstractFileRepository implements Repository, Configurable private String destination; + @Override public void configure(HierarchicalConfiguration configuration) throws ConfigurationException { destination = configuration.getString("[@destinationURL]"); } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/repository/file/ClassLoaderObjectInputStream.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/repository/file/ClassLoaderObjectInputStream.java b/server/data/data-library/src/main/java/org/apache/james/repository/file/ClassLoaderObjectInputStream.java index 4bda697..a46c676 100644 --- a/server/data/data-library/src/main/java/org/apache/james/repository/file/ClassLoaderObjectInputStream.java +++ b/server/data/data-library/src/main/java/org/apache/james/repository/file/ClassLoaderObjectInputStream.java @@ -36,6 +36,7 @@ public class ClassLoaderObjectInputStream extends ObjectInputStream { this.classLoader = classLoader; } + @Override protected Class<?> resolveClass(ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException { final Class<?> clazz = Class.forName(objectStreamClass.getName(), false, classLoader); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/repository/file/ExtensionFileFilter.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/repository/file/ExtensionFileFilter.java b/server/data/data-library/src/main/java/org/apache/james/repository/file/ExtensionFileFilter.java index c052c19..5aa025a 100644 --- a/server/data/data-library/src/main/java/org/apache/james/repository/file/ExtensionFileFilter.java +++ b/server/data/data-library/src/main/java/org/apache/james/repository/file/ExtensionFileFilter.java @@ -51,6 +51,7 @@ public class ExtensionFileFilter implements FilenameFilter { extensions = new String[] { extension }; } + @Override public boolean accept(File file, String name) { return Arrays.stream(extensions).anyMatch(name::endsWith); } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/repository/file/FilePersistentObjectRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/repository/file/FilePersistentObjectRepository.java b/server/data/data-library/src/main/java/org/apache/james/repository/file/FilePersistentObjectRepository.java index 5af987c..6e44113 100644 --- a/server/data/data-library/src/main/java/org/apache/james/repository/file/FilePersistentObjectRepository.java +++ b/server/data/data-library/src/main/java/org/apache/james/repository/file/FilePersistentObjectRepository.java @@ -35,18 +35,12 @@ import org.slf4j.LoggerFactory; public class FilePersistentObjectRepository extends AbstractFileRepository implements ObjectRepository { private static final Logger LOGGER = LoggerFactory.getLogger(FilePersistentObjectRepository.class); - /** - * @see - * org.apache.james.repository.file.AbstractFileRepository#getExtensionDecorator() - */ + @Override protected String getExtensionDecorator() { return ".FileObjectStore"; } - /** - * @see - * org.apache.james.repository.api.ObjectRepository#get(java.lang.String) - */ + @Override public synchronized Object get(String key) { try { final InputStream inputStream = getInputStream(key); @@ -70,11 +64,7 @@ public class FilePersistentObjectRepository extends AbstractFileRepository imple } } - /** - * @see - * org.apache.james.repository.api.ObjectRepository#get(java.lang.String, - * java.lang.ClassLoader) - */ + @Override public synchronized Object get(String key, ClassLoader classLoader) { try { final InputStream inputStream = getInputStream(key); @@ -101,11 +91,7 @@ public class FilePersistentObjectRepository extends AbstractFileRepository imple } - /** - * @see - * org.apache.james.repository.api.ObjectRepository#put(java.lang.String, - * java.lang.Object) - */ + @Override public synchronized void put(String key, Object value) { try (OutputStream outputStream = getOutputStream(key)) { final ObjectOutputStream stream = new ObjectOutputStream(outputStream); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/repository/file/NumberedRepositoryFileFilter.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/repository/file/NumberedRepositoryFileFilter.java b/server/data/data-library/src/main/java/org/apache/james/repository/file/NumberedRepositoryFileFilter.java index 0f40f00..cbcf292 100644 --- a/server/data/data-library/src/main/java/org/apache/james/repository/file/NumberedRepositoryFileFilter.java +++ b/server/data/data-library/src/main/java/org/apache/james/repository/file/NumberedRepositoryFileFilter.java @@ -41,9 +41,7 @@ public class NumberedRepositoryFileFilter implements FilenameFilter { prefix = ".Repository"; } - /** - * @see java.io.FilenameFilter#accept(File, String) - */ + @Override public boolean accept(File file, String name) { // System.out.println("check: " + name); // System.out.println("post: " + postfix); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java index 730f9d4..ff8af77 100644 --- a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java +++ b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java @@ -58,9 +58,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT this.domainList = domainList; } - /** - * @see org.apache.james.lifecycle.api.Configurable#configure(HierarchicalConfiguration) - */ + @Override public void configure(HierarchicalConfiguration config) throws ConfigurationException { setRecursiveMapping(config.getBoolean("recursiveMapping", true)); try { @@ -100,10 +98,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT this.mappingLimit = mappingLimit; } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#getMappings(String, - * String) - */ + @Override public Mappings getMappings(String user, String domain) throws ErrorMappingException, RecipientRewriteTableException { return getMappings(user, domain, mappingLimit); } @@ -185,10 +180,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT return null; } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#addRegexMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void addRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException { try { Pattern.compile(regex); @@ -202,19 +194,13 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#removeRegexMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void removeRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException { LOGGER.info("Remove regex mapping => {} for user: {} domain: {}", regex, user, domain); removeMappingInternal(user, domain, MappingImpl.regex(regex)); } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#addAddressMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void addAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException { if (address.indexOf('@') < 0) { try { @@ -234,10 +220,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#removeAddressMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void removeAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException { if (address.indexOf('@') < 0) { try { @@ -250,10 +233,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT removeMappingInternal(user, domain, MappingImpl.address(address)); } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#addErrorMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void addErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException { checkMapping(user, domain, MappingImpl.error(error)); LOGGER.info("Add error mapping => {} for user: {} domain: {}", error, user, domain); @@ -261,19 +241,13 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#removeErrorMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void removeErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException { LOGGER.info("Remove error mapping => {} for user: {} domain: {}", error, user, domain); removeMappingInternal(user, domain, MappingImpl.error(error)); } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#addMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void addMapping(String user, String domain, String mapping) throws RecipientRewriteTableException { String map = mapping.toLowerCase(Locale.US); @@ -293,10 +267,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#removeMapping(java.lang.String, - * java.lang.String, java.lang.String) - */ + @Override public void removeMapping(String user, String domain, String mapping) throws RecipientRewriteTableException { String map = mapping.toLowerCase(Locale.US); @@ -316,9 +287,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#getAllMappings() - */ + @Override public Map<String, Mappings> getAllMappings() throws RecipientRewriteTableException { int count = 0; Map<String, Mappings> mappings = getAllMappingsInternal(); @@ -330,27 +299,18 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT return mappings; } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#getUserDomainMappings(java.lang.String, - * java.lang.String) - */ + @Override public Mappings getUserDomainMappings(String user, String domain) throws RecipientRewriteTableException { return getUserDomainMappingsInternal(user, domain); } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#addAliasDomainMapping(java.lang.String, - * java.lang.String) - */ + @Override public void addAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException { LOGGER.info("Add domain mapping: {} => {}", aliasDomain, realDomain); addMappingInternal(null, aliasDomain, MappingImpl.domain(realDomain)); } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#removeAliasDomainMapping(java.lang.String, - * java.lang.String) - */ + @Override public void removeAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException { LOGGER.info("Remove domain mapping: {} => {}", aliasDomain, realDomain); removeMappingInternal(null, aliasDomain, MappingImpl.domain(realDomain)); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java index 879ccfb..109f2a3 100644 --- a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java +++ b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java @@ -46,11 +46,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re this.rrt = rrt; } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#addRegexMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void addRegexMapping(String user, String domain, String regex) throws Exception { try { rrt.addRegexMapping(user, domain, regex); @@ -59,11 +55,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#removeRegexMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void removeRegexMapping(String user, String domain, String regex) throws Exception { try { rrt.removeRegexMapping(user, domain, regex); @@ -72,11 +64,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#addAddressMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void addAddressMapping(String user, String domain, String address) throws Exception { try { rrt.addAddressMapping(user, domain, address); @@ -85,11 +73,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#removeAddressMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void removeAddressMapping(String user, String domain, String address) throws Exception { try { rrt.removeAddressMapping(user, domain, address); @@ -98,11 +82,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#addErrorMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void addErrorMapping(String user, String domain, String error) throws Exception { try { rrt.addErrorMapping(user, domain, error); @@ -111,11 +91,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#removeErrorMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void removeErrorMapping(String user, String domain, String error) throws Exception { try { rrt.removeErrorMapping(user, domain, error); @@ -124,6 +100,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } + @Override public void addDomainMapping(String domain, String targetDomain) throws Exception { try { rrt.addAliasDomainMapping(domain, targetDomain); @@ -132,6 +109,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } + @Override public void removeDomainMapping(String domain, String targetDomain) throws Exception { try { rrt.removeAliasDomainMapping(domain, targetDomain); @@ -140,10 +118,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTableManagementMBean - * #getUserDomainMappings(java.lang.String, java.lang.String) - */ + @Override public Mappings getUserDomainMappings(String user, String domain) throws Exception { try { return rrt.getUserDomainMappings(user, domain); @@ -152,11 +127,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean - * #addMapping(java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void addMapping(String user, String domain, String mapping) throws Exception { try { rrt.addMapping(user, domain, mapping); @@ -165,11 +136,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#removeMapping - * (java.lang.String, java.lang.String, java.lang.String) - */ + @Override public void removeMapping(String user, String domain, String mapping) throws Exception { try { rrt.removeMapping(user, domain, mapping); @@ -178,10 +145,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements Re } } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTableManagementMBean#getAllMappings() - */ + @Override public Map<String, Mappings> getAllMappings() throws Exception { try { return ImmutableMap.copyOf(rrt.getAllMappings()); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractJamesUsersRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractJamesUsersRepository.java b/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractJamesUsersRepository.java index 89ca24c..45f57b3 100644 --- a/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractJamesUsersRepository.java +++ b/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractJamesUsersRepository.java @@ -92,10 +92,7 @@ public abstract class AbstractJamesUsersRepository extends AbstractUsersReposito */ protected abstract void doUpdateUser(User user) throws UsersRepositoryException; - /** - * @see - * org.apache.james.user.lib.AbstractUsersRepository#doAddUser(java.lang.String, java.lang.String) - */ + @Override protected void doAddUser(String username, String password) throws UsersRepositoryException { User newbie = new DefaultJamesUser(username, "SHA"); newbie.setPassword(password); @@ -110,6 +107,7 @@ public abstract class AbstractJamesUsersRepository extends AbstractUsersReposito * the user to be updated * @throws UsersRepositoryException */ + @Override public void updateUser(User user) throws UsersRepositoryException { // Return false if it's not found. if (!contains(user.getUserName())) { @@ -119,11 +117,7 @@ public abstract class AbstractJamesUsersRepository extends AbstractUsersReposito } } - /** - * @throws RecipientRewriteTableException - * @see org.apache.james.rrt.api.RecipientRewriteTable#getMappings(java.lang.String, - * java.lang.String) - */ + @Override public Mappings getMappings(String username, String domain) throws ErrorMappingException, RecipientRewriteTableException { Builder mappingsBuilder = MappingsImpl.builder(); try { @@ -160,30 +154,22 @@ public abstract class AbstractJamesUsersRepository extends AbstractUsersReposito } } - /** - * @see org.apache.james.user.api.JamesUsersRepository#setEnableAliases(boolean) - */ + @Override public void setEnableAliases(boolean enableAliases) { this.enableAliases = enableAliases; } - /** - * @see org.apache.james.user.api.JamesUsersRepository#setEnableForwarding(boolean) - */ + @Override public void setEnableForwarding(boolean enableForwarding) { this.enableForwarding = enableForwarding; } - /** - * @see org.apache.james.user.api.JamesUsersRepository#setIgnoreCase(boolean) - */ + @Override public void setIgnoreCase(boolean ignoreCase) { this.ignoreCase = ignoreCase; } - /** - * @see org.apache.james.rrt.api.RecipientRewriteTable#getAllMappings() - */ + @Override public Map<String, Mappings> getAllMappings() throws RecipientRewriteTableException { Map<String, Mappings> mappings = new HashMap<>(); if (enableAliases || enableForwarding) { @@ -215,58 +201,65 @@ public abstract class AbstractJamesUsersRepository extends AbstractUsersReposito return mappings; } - /** - * @see - * org.apache.james.rrt.api.RecipientRewriteTable#getUserDomainMappings(java.lang.String, java.lang.String) - */ + @Override public Mappings getUserDomainMappings(String user, String domain) throws RecipientRewriteTableException { return MappingsImpl.empty(); } + @Override public void addRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void removeRegexMapping(String user, String domain, String regex) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void addAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void removeAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void addErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void removeErrorMapping(String user, String domain, String error) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void addMapping(String user, String domain, String mapping) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void removeMapping(String user, String domain, String mapping) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void addAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); } + @Override public void removeAliasDomainMapping(String aliasDomain, String realDomain) throws RecipientRewriteTableException { throw new RecipientRewriteTableException("Read-Only RecipientRewriteTable"); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractUsersRepository.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractUsersRepository.java b/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractUsersRepository.java index 2ea075f..9ec041c 100644 --- a/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractUsersRepository.java +++ b/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractUsersRepository.java @@ -41,10 +41,7 @@ public abstract class AbstractUsersRepository implements UsersRepository, Config private boolean virtualHosting; private Optional<String> administratorId; - /** - * @see - * org.apache.james.lifecycle.api.Configurable#configure(org.apache.commons.configuration.HierarchicalConfiguration) - */ + @Override public void configure(HierarchicalConfiguration configuration) throws ConfigurationException { virtualHosting = configuration.getBoolean("enableVirtualHosting", getDefaultVirtualHostingValue()); @@ -93,10 +90,7 @@ public abstract class AbstractUsersRepository implements UsersRepository, Config } } - /** - * @see org.apache.james.user.api.UsersRepository#addUser(java.lang.String, - * java.lang.String) - */ + @Override public void addUser(String username, String password) throws UsersRepositoryException { if (!contains(username)) { @@ -108,9 +102,7 @@ public abstract class AbstractUsersRepository implements UsersRepository, Config } - /** - * @see org.apache.james.user.api.UsersRepository#supportVirtualHosting() - */ + @Override public boolean supportVirtualHosting() { return virtualHosting; } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultJamesUser.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultJamesUser.java b/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultJamesUser.java index a635e18..6ed3f1f 100644 --- a/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultJamesUser.java +++ b/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultJamesUser.java @@ -72,62 +72,46 @@ public class DefaultJamesUser extends DefaultUser implements JamesUser { alias = ""; } - /** - * @see org.apache.james.user.api.model.JamesUser#setForwarding(boolean) - */ + @Override public void setForwarding(boolean forward) { forwarding = forward; } - /** - * @see org.apache.james.user.api.model.JamesUser#getForwarding() - */ + @Override public boolean getForwarding() { return forwarding; } - /** - * @see org.apache.james.user.api.model.JamesUser#setForwardingDestination(MailAddress) - */ + @Override public boolean setForwardingDestination(MailAddress address) { /* TODO: Some verification would be good */ forwardingDestination = address; return true; } - /** - * @see org.apache.james.user.api.model.JamesUser#getForwardingDestination() - */ + @Override public MailAddress getForwardingDestination() { return forwardingDestination; } - /** - * @see org.apache.james.user.api.model.JamesUser#setAliasing(boolean) - */ + @Override public void setAliasing(boolean alias) { aliasing = alias; } - /** - * @see org.apache.james.user.api.model.JamesUser#getAliasing() - */ + @Override public boolean getAliasing() { return aliasing; } - /** - * @see org.apache.james.user.api.model.JamesUser#setAlias(java.lang.String) - */ + @Override public boolean setAlias(String address) { /* TODO: Some verification would be good */ alias = address; return true; } - /** - * @see org.apache.james.user.api.model.JamesUser#getAlias() - */ + @Override public String getAlias() { return alias; } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultUser.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultUser.java b/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultUser.java index 891c076..9a565b5 100644 --- a/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultUser.java +++ b/server/data/data-library/src/main/java/org/apache/james/user/lib/model/DefaultUser.java @@ -67,16 +67,12 @@ public class DefaultUser implements User, Serializable { algorithm = hashAlg; } - /** - * @see org.apache.james.user.api.model.User#getUserName() - */ + @Override public String getUserName() { return userName; } - /** - * @see org.apache.james.user.api.model.User#verifyPassword(java.lang.String) - */ + @Override public boolean verifyPassword(String pass) { try { String hashGuess = DigestUtil.digestString(pass, algorithm); @@ -86,9 +82,7 @@ public class DefaultUser implements User, Serializable { } } - /** - * @see org.apache.james.user.api.model.User#setPassword(java.lang.String) - */ + @Override public boolean setPassword(String newPass) { try { hashedPassword = DigestUtil.digestString(newPass, algorithm); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-memory/src/test/java/org/apache/james/domainlist/memory/MemoryDomainListTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-memory/src/test/java/org/apache/james/domainlist/memory/MemoryDomainListTest.java b/server/data/data-memory/src/test/java/org/apache/james/domainlist/memory/MemoryDomainListTest.java index 3cde69f..2095aa5 100644 --- a/server/data/data-memory/src/test/java/org/apache/james/domainlist/memory/MemoryDomainListTest.java +++ b/server/data/data-memory/src/test/java/org/apache/james/domainlist/memory/MemoryDomainListTest.java @@ -25,6 +25,7 @@ import org.junit.Before; public class MemoryDomainListTest extends AbstractDomainListTest { + @Override @Before public void setUp() throws Exception { super.setUp(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-memory/src/test/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTableTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-memory/src/test/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTableTest.java b/server/data/data-memory/src/test/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTableTest.java index 999cbef..509b76f 100644 --- a/server/data/data-memory/src/test/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTableTest.java +++ b/server/data/data-memory/src/test/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTableTest.java @@ -28,11 +28,13 @@ import org.junit.Before; public class MemoryRecipientRewriteTableTest extends AbstractRecipientRewriteTableTest { + @Override @Before public void setUp() throws Exception { super.setUp(); } + @Override @After public void tearDown() throws Exception { super.tearDown(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/data/data-memory/src/test/java/org/apache/james/user/memory/MemoryUsersRepositoryTest.java ---------------------------------------------------------------------- diff --git a/server/data/data-memory/src/test/java/org/apache/james/user/memory/MemoryUsersRepositoryTest.java b/server/data/data-memory/src/test/java/org/apache/james/user/memory/MemoryUsersRepositoryTest.java index 05e096c..7aa49cb 100644 --- a/server/data/data-memory/src/test/java/org/apache/james/user/memory/MemoryUsersRepositoryTest.java +++ b/server/data/data-memory/src/test/java/org/apache/james/user/memory/MemoryUsersRepositoryTest.java @@ -25,6 +25,7 @@ import org.junit.Before; public class MemoryUsersRepositoryTest extends AbstractUsersRepositoryTest { + @Override @Before public void setUp() throws Exception { super.setUp(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/mock/MockDNSService.java ---------------------------------------------------------------------- diff --git a/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/mock/MockDNSService.java b/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/mock/MockDNSService.java index 5f30924..b7c238c 100644 --- a/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/mock/MockDNSService.java +++ b/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/mock/MockDNSService.java @@ -29,49 +29,31 @@ import org.apache.james.dnsservice.api.DNSService; */ public class MockDNSService implements DNSService { - /** - * @see org.apache.james.dnsservice.api.DNSService#findMXRecords(String) - */ @Override public Collection<String> findMXRecords(String hostname) { throw new UnsupportedOperationException("Unimplemented Stub Method"); } - /** - * @see org.apache.james.dnsservice.api.DNSService#findTXTRecords(String) - */ @Override public Collection<String> findTXTRecords(String hostname) { throw new UnsupportedOperationException("Unimplemented Stub Method"); } - /** - * @see org.apache.james.dnsservice.api.DNSService#getAllByName(String) - */ @Override public Collection<InetAddress> getAllByName(String host) throws UnknownHostException { throw new UnsupportedOperationException("Unimplemented Stub Method"); } - /** - * @see org.apache.james.dnsservice.api.DNSService#getByName(String) - */ @Override public InetAddress getByName(String host) throws UnknownHostException { throw new UnsupportedOperationException("Unimplemented Stub Method"); } - /** - * @see org.apache.james.dnsservice.api.DNSService#getHostName(java.net.InetAddress) - */ @Override public String getHostName(InetAddress addr) { throw new UnsupportedOperationException("Unimplemented Stub Method"); } - /** - * @see org.apache.james.dnsservice.api.DNSService#getLocalHost() - */ @Override public InetAddress getLocalHost() throws UnknownHostException { throw new UnsupportedOperationException("Unimplemented Stub Method"); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java ---------------------------------------------------------------------- diff --git a/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java b/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java index 0230768..fe8e6d7 100644 --- a/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java +++ b/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java @@ -397,6 +397,7 @@ public class DNSJavaService implements DNSService, DNSServiceMBean, Configurable * < 0 ==> a < b = 0 ==> a = b > 0 ==> a > b */ private static class MXRecordComparator implements Comparator<MXRecord> { + @Override public int compare(MXRecord a, MXRecord b) { int pa = a.getPriority(); int pb = b.getPriority(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/dns-service/dnsservice-library/src/main/java/org/apache/james/dnsservice/library/MXHostAddressIterator.java ---------------------------------------------------------------------- diff --git a/server/dns-service/dnsservice-library/src/main/java/org/apache/james/dnsservice/library/MXHostAddressIterator.java b/server/dns-service/dnsservice-library/src/main/java/org/apache/james/dnsservice/library/MXHostAddressIterator.java index 8e4d1fa..9684e90 100644 --- a/server/dns-service/dnsservice-library/src/main/java/org/apache/james/dnsservice/library/MXHostAddressIterator.java +++ b/server/dns-service/dnsservice-library/src/main/java/org/apache/james/dnsservice/library/MXHostAddressIterator.java @@ -107,9 +107,6 @@ public class MXHostAddressIterator implements Iterator<HostAddress> { return addresses.next(); } - /** - * Not supported. - */ @Override public void remove() { throw new UnsupportedOperationException("remove not supported by this iterator"); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfiguration.java ---------------------------------------------------------------------- diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfiguration.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfiguration.java index de9a23b..fc4fac5 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfiguration.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfiguration.java @@ -121,6 +121,7 @@ public class SmtpConfiguration implements SerializableAsXml { this.maxMessageSizeInKb = maxMessageSizeInKb; } + @Override public String serializeAsXml() throws IOException { HashMap<String, Object> scopes = new HashMap<>(); scopes.put("hasAuthorizedAddresses", authorizedAddresses.isPresent()); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailSpooler.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailSpooler.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailSpooler.java index b077060..f9b6a0b 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailSpooler.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailSpooler.java @@ -106,9 +106,7 @@ public class JamesMailSpooler implements Runnable, Disposable, Configurable, Mai this.mailProcessor = mailProcessor; } - /** - * @see org.apache.james.lifecycle.api.Configurable#configure(org.apache.commons.configuration.HierarchicalConfiguration) - */ + @Override public void configure(HierarchicalConfiguration config) throws ConfigurationException { numDequeueThreads = config.getInt("dequeueThreads", 2); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailetContext.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailetContext.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailetContext.java index 209faa8..7579d39 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailetContext.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailetContext.java @@ -136,8 +136,6 @@ public class JamesMailetContext implements MailetContext, Configurable { * is different than a mail-client's reply, which would use the Reply-To or * From header. This will send the bounce with the server's postmaster as * the sender. - * - * @see org.apache.mailet.MailetContext#bounce(Mail, String) */ @Override public void bounce(Mail mail, String message) throws MessagingException { @@ -170,8 +168,6 @@ public class JamesMailetContext implements MailetContext, Configurable { * multipart (mixed)/ contentPartRoot (body) = mpContent (alternative)/ part * (body) = message part (body) = original * </p> - * - * @see org.apache.mailet.MailetContext#bounce(Mail, String, MailAddress) */ @Override public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException { @@ -392,6 +388,7 @@ public class JamesMailetContext implements MailetContext, Configurable { sendMail(sender, recipients, message); } + @Override public void sendMail(MailAddress sender, Collection<MailAddress> recipients, MimeMessage message) throws MessagingException { sendMail(sender, recipients, message, Mail.DEFAULT); } @@ -420,6 +417,7 @@ public class JamesMailetContext implements MailetContext, Configurable { rootMailQueue.enQueue(mail, delay, unit); } + @Override public void sendMail(MailAddress sender, Collection<MailAddress> recipients, MimeMessage message, String state) throws MessagingException { MailImpl mail = new MailImpl(MailImpl.getId(), sender, recipients, message); try { http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MailetConfigImpl.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MailetConfigImpl.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MailetConfigImpl.java index b41bb53..ed40f79 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MailetConfigImpl.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MailetConfigImpl.java @@ -64,6 +64,7 @@ public class MailetConfigImpl implements MailetConfig { * * @return the parameter value */ + @Override public String getInitParameter(String name) { return configuration.getString(name); } @@ -71,6 +72,7 @@ public class MailetConfigImpl implements MailetConfig { /** * @return an iterator over the set of configuration parameter names. */ + @Override public Iterator<String> getInitParameterNames() { Iterator<String> it = configuration.getKeys(); List<String> params = new ArrayList<>(); @@ -98,11 +100,7 @@ public class MailetConfigImpl implements MailetConfig { return configuration.getString("[@" + name + "]", null); } - /** - * Get the mailet's MailetContext object. - * - * @return the MailetContext for the mailet - */ + @Override public MailetContext getMailetContext() { return mailetContext; } @@ -153,11 +151,7 @@ public class MailetConfigImpl implements MailetConfig { configuration = builder; } - /** - * Get the name of the mailet. - * - * @return the name of the mailet - */ + @Override public String getMailetName() { return name; } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MatcherConfigImpl.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MatcherConfigImpl.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MatcherConfigImpl.java index 2a4ed12..39cec65 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MatcherConfigImpl.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MatcherConfigImpl.java @@ -42,6 +42,7 @@ public class MatcherConfigImpl implements MatcherConfig { * * @return a String containing the value of the initialization parameter */ + @Override public String getCondition() { return condition; } @@ -61,6 +62,7 @@ public class MatcherConfigImpl implements MatcherConfig { * * @return the name of the matcher instance */ + @Override public String getMatcherName() { return name; } @@ -82,6 +84,7 @@ public class MatcherConfigImpl implements MatcherConfig { * @return a MailetContext object, used by the matcher to interact with its * mailet container */ + @Override public MailetContext getMailetContext() { return context; } http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelCompositeProcessor.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelCompositeProcessor.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelCompositeProcessor.java index c4e4b3d..14aeaeb 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelCompositeProcessor.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelCompositeProcessor.java @@ -69,6 +69,7 @@ public class CamelCompositeProcessor extends AbstractStateCompositeProcessor imp this.mailetContext = mailetContext; } + @Override @PostConstruct public void init() throws Exception { super.init(); @@ -88,24 +89,17 @@ public class CamelCompositeProcessor extends AbstractStateCompositeProcessor imp } } - /** - * @see org.apache.camel.CamelContextAware#getCamelContext() - */ + @Override public CamelContext getCamelContext() { return camelContext; } - /** - * @see org.apache.camel.CamelContextAware#setCamelContext(org.apache.camel.CamelContext) - */ + @Override public void setCamelContext(CamelContext camelContext) { this.camelContext = camelContext; } - /** - * @see org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor - * #createMailProcessor(java.lang.String, org.apache.commons.configuration.HierarchicalConfiguration) - */ + @Override protected MailProcessor createMailProcessor(String name, HierarchicalConfiguration config) throws Exception { CamelMailetProcessor processor = new CamelMailetProcessor(metricFactory); try { http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelMailetProcessor.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelMailetProcessor.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelMailetProcessor.java index 4f10b80..b4808c8 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelMailetProcessor.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelMailetProcessor.java @@ -64,10 +64,7 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement this.metricFactory = metricFactory; } - /** - * @see - * org.apache.james.mailetcontainer.api.MailProcessor#service(org.apache.mailet.Mail) - */ + @Override public void service(Mail mail) throws MessagingException { try { producerTemplate.sendBody(getEndpoint(), mail); @@ -77,16 +74,12 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement } } - /** - * @see org.apache.camel.CamelContextAware#getCamelContext() - */ + @Override public CamelContext getCamelContext() { return context; } - /** - * @see org.apache.camel.CamelContextAware#setCamelContext(org.apache.camel.CamelContext) - */ + @Override public void setCamelContext(CamelContext context) { this.context = context; } @@ -106,6 +99,7 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement return "direct:processor." + getState(); } + @Override @PostConstruct public void init() throws Exception { producerTemplate = context.createProducerTemplate(); @@ -116,11 +110,7 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement super.init(); } - /** - * @see - * org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor#setupRouting - * (java.util.List) - */ + @Override protected void setupRouting(List<MatcherMailetPair> pairs) throws MessagingException { try { this.pairs = pairs; @@ -198,6 +188,7 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement private final class RemovePropertiesProcessor implements Processor { + @Override public void process(Exchange exchange) throws Exception { exchange.removeProperty(MatcherSplitter.ON_MATCH_EXCEPTION_PROPERTY); exchange.removeProperty(MatcherSplitter.MATCHER_PROPERTY); @@ -206,6 +197,7 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement private final class CompleteProcessor implements Processor { + @Override public void process(Exchange ex) throws Exception { LOGGER.debug("End of mailetprocessor for state {} reached", getState()); ex.setProperty(Exchange.ROUTE_STOP, true); @@ -214,6 +206,7 @@ public class CamelMailetProcessor extends AbstractStateMailetProcessor implement private final class StateChangedProcessor implements Processor { + @Override public void process(Exchange arg0) throws Exception { Mail mail = arg0.getIn().getBody(Mail.class); toProcessor(mail); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java index e5da468..3b3eba8 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java @@ -64,6 +64,7 @@ public class CamelProcessor implements Processor { /** * Call the wrapped mailet for the exchange */ + @Override public void process(Exchange exchange) throws Exception { Mail mail = exchange.getIn().getBody(Mail.class); long start = System.currentTimeMillis(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/DisposeProcessor.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/DisposeProcessor.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/DisposeProcessor.java index 0160596..84cf661 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/DisposeProcessor.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/DisposeProcessor.java @@ -29,9 +29,7 @@ import org.apache.mailet.Mail; */ public class DisposeProcessor implements Processor { - /** - * @see org.apache.camel.Processor#process(org.apache.camel.Exchange) - */ + @Override public void process(Exchange arg0) throws Exception { Mail mail = arg0.getIn().getBody(Mail.class); LifecycleUtil.dispose(mail.getMessage()); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateEquals.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateEquals.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateEquals.java index 486d773..6f2b00d 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateEquals.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateEquals.java @@ -33,9 +33,7 @@ public class MailStateEquals implements Predicate { this.state = state; } - /** - * @see org.apache.camel.Predicate#matches(org.apache.camel.Exchange) - */ + @Override public boolean matches(Exchange ex) { Mail m = ex.getIn().getBody(Mail.class); return state.equals(m.getState()); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateNotEquals.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateNotEquals.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateNotEquals.java index 88f1b1a..11b124e 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateNotEquals.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MailStateNotEquals.java @@ -33,9 +33,7 @@ public class MailStateNotEquals implements Predicate { this.state = state; } - /** - * @see org.apache.camel.Predicate#matches(org.apache.camel.Exchange) - */ + @Override public boolean matches(Exchange ex) { Mail m = ex.getIn().getBody(Mail.class); return !state.equals(m.getState()); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MatcherMatch.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MatcherMatch.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MatcherMatch.java index 172a0ae..038f05d 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MatcherMatch.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MatcherMatch.java @@ -30,9 +30,7 @@ import org.apache.mailet.Mail; */ public class MatcherMatch implements Predicate { - /** - * @see org.apache.camel.Predicate#matches(org.apache.camel.Exchange) - */ + @Override public boolean matches(Exchange arg0) { Mail m = arg0.getIn().getBody(Mail.class); return m.removeAttribute(MatcherSplitter.MATCHER_MATCHED_ATTRIBUTE) != null; http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateCompositeProcessorListener.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateCompositeProcessorListener.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateCompositeProcessorListener.java index f4839d1..098cbe3 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateCompositeProcessorListener.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateCompositeProcessorListener.java @@ -110,12 +110,7 @@ public class JMXStateCompositeProcessorListener implements CompositeProcessorLis } - /** - * @see - * org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor.CompositeProcessorListener - * #afterProcessor(org.apache.james.mailetcontainer.api.MailProcessor, java.lang.String, - * long, javax.mail.MessagingException) - */ + @Override public void afterProcessor(MailProcessor processor, String mailName, long processTime, MessagingException e) { MailProcessorManagement m = mMap.get(processor); if (m != null) { @@ -123,9 +118,7 @@ public class JMXStateCompositeProcessorListener implements CompositeProcessorLis } } - /** - * @see org.apache.james.lifecycle.api.Disposable#dispose() - */ + @Override public void dispose() { unregisterMBeans(); mMap.clear(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateMailetProcessorListener.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateMailetProcessorListener.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateMailetProcessorListener.java index 496b109..4a07dba 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateMailetProcessorListener.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateMailetProcessorListener.java @@ -61,11 +61,7 @@ public class JMXStateMailetProcessorListener implements MailetProcessorListener, registerMBeans(); } - /** - * @see - * org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.MailetProcessorListener - * #afterMailet(org.apache.mailet.Mailet, java.lang.String, java.lang.String, long, java.lang.Exception) - */ + @Override public void afterMailet(Mailet m, String mailName, String state, long processTime, Exception e) { MailetManagement mgmt = mailetMap.get(m); if (mgmt != null) { @@ -73,12 +69,7 @@ public class JMXStateMailetProcessorListener implements MailetProcessorListener, } } - /** - * @see - * org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.MailetProcessorListener - * #afterMatcher(org.apache.mailet.Matcher, java.lang.String, java.util.Collection, - * java.util.Collection, long, java.lang.Exception) - */ + @Override public void afterMatcher(Matcher m, String mailName, Collection<MailAddress> rcpts, Collection<MailAddress> matches, long processTime, Exception e) { MatcherManagement mgmt = matcherMap.get(m); @@ -162,9 +153,7 @@ public class JMXStateMailetProcessorListener implements MailetProcessorListener, } - /** - * @see org.apache.james.lifecycle.api.Disposable#dispose() - */ + @Override public void dispose() { unregisterMBeans(); mailetMap.clear(); http://git-wip-us.apache.org/repos/asf/james-project/blob/f209526e/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailProcessorManagement.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailProcessorManagement.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailProcessorManagement.java index 9022021..4e3f567 100644 --- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailProcessorManagement.java +++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailProcessorManagement.java @@ -70,9 +70,7 @@ public class MailProcessorManagement extends StandardMBean implements MailProces } - /** - * @see org.apache.james.mailetcontainer.api.jmx.MailProcessorManagementMBean#getHandledMailCount() - */ + @Override public long getHandledMailCount() { return getSuccessCount() + getErrorCount(); } @@ -80,7 +78,7 @@ public class MailProcessorManagement extends StandardMBean implements MailProces /* * TODO * Is deprecated or dead code? Can't find an interface defining this method - * + * * @see * org.apache.james.mailetcontainer.api.jmx.MailProcessorDetailMBean#getName() */ @@ -88,39 +86,27 @@ public class MailProcessorManagement extends StandardMBean implements MailProces return processorName; } - /** - * @see org.apache.james.mailetcontainer.api.jmx.MailProcessorManagementMBean#getFastestProcessing() - */ + @Override public long getFastestProcessing() { return fastestProcessing.get(); } - /** - * @see org.apache.james.mailetcontainer.api.jmx.MailProcessorManagementMBean#getSlowestProcessing() - */ + @Override public long getSlowestProcessing() { return slowestProcessing.get(); } - /** - * @see - * org.apache.james.mailetcontainer.api.jmx.MailProcessorManagementMBean#getErrorCount() - */ + @Override public long getErrorCount() { return errorCount.get(); } - /** - * @see - * org.apache.james.mailetcontainer.api.jmx.MailProcessorManagementMBean#getSuccessCount() - */ + @Override public long getSuccessCount() { return successCount.get(); } - /** - * @see org.apache.james.mailetcontainer.api.jmx.MailProcessorManagementMBean#getLastProcessing() - */ + @Override public long getLastProcessing() { return lastProcessing.get(); } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org