This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 9744ffa4112162b8aa2aa8d2fd13b51bcf3517ac Author: Benoit Tellier <btell...@linagora.com> AuthorDate: Fri Nov 8 14:04:29 2019 +0700 [Refactoring] Resolve most warnings for mailbox-store javadoc --- .../mailbox/store/AbstractMailboxPathLocker.java | 9 ------ .../store/AbstractMailboxSessionIdGenerator.java | 6 ++-- .../james/mailbox/store/LazyMimeDescriptor.java | 2 -- .../mailbox/store/MailboxSessionMapperFactory.java | 10 +------ .../apache/james/mailbox/store/ResultUtils.java | 5 +--- .../james/mailbox/store/StoreMailboxManager.java | 10 +------ .../james/mailbox/store/StoreMessageManager.java | 31 +------------------- .../mailbox/store/StoreMessageResultIterator.java | 3 -- .../james/mailbox/store/StoreRightManager.java | 2 -- .../mailbox/store/StoreSubscriptionManager.java | 4 --- .../store/mail/AbstractLockingModSeqProvider.java | 6 ---- .../store/mail/AbstractLockingUidProvider.java | 2 -- .../james/mailbox/store/mail/MailboxMapper.java | 31 +------------------- .../mailbox/store/mail/MailboxMapperFactory.java | 3 -- .../james/mailbox/store/mail/MessageMapper.java | 33 +--------------------- .../mailbox/store/mail/MessageMapperFactory.java | 3 -- .../james/mailbox/store/mail/ModSeqProvider.java | 22 --------------- .../james/mailbox/store/mail/UidProvider.java | 2 -- .../mailbox/store/mail/model/MailboxMessage.java | 24 +--------------- .../james/mailbox/store/mail/model/Message.java | 14 +-------- .../mailbox/store/search/MessageSearches.java | 8 ------ .../james/mailbox/store/search/SearchUtil.java | 30 +++++--------------- .../store/streaming/CountingInputStream.java | 3 -- .../mailbox/store/streaming/FullByteContent.java | 1 - .../store/streaming/InputStreamContent.java | 1 - .../james/mailbox/store/transaction/Mapper.java | 6 ---- .../store/transaction/TransactionalMapper.java | 7 ----- .../store/user/SubscriptionMapperFactory.java | 3 -- 28 files changed, 17 insertions(+), 264 deletions(-) diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxPathLocker.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxPathLocker.java index a056285..13a61a8 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxPathLocker.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxPathLocker.java @@ -41,22 +41,13 @@ public abstract class AbstractMailboxPathLocker implements MailboxPathLocker { } } - /** * Perform lock - * - * @param session - * @param path - * @throws MailboxException */ protected abstract void lock(MailboxSession session, MailboxPath path, boolean writeLock) throws MailboxException; /** * Release lock - * - * @param session - * @param path - * @throws MailboxException */ protected abstract void unlock(MailboxSession session, MailboxPath path, boolean writeLock) throws MailboxException; diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxSessionIdGenerator.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxSessionIdGenerator.java index a7b4cee..6f4459f 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxSessionIdGenerator.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/AbstractMailboxSessionIdGenerator.java @@ -34,12 +34,10 @@ public abstract class AbstractMailboxSessionIdGenerator implements MailboxSessio } return id; } - - + /** * Generate the next id to use - * - * + * * @return id */ protected abstract long generateNextId(); diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java index b4d70d4..25d6a37 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java @@ -36,8 +36,6 @@ import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder; /** * A {@link MimeDescriptor} implementation which tries to optimize the way the data * is loading by using it in a lazy fashion whenever possible. - * - * */ public class LazyMimeDescriptor implements MimeDescriptor { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java index f8ef502..358c415 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java @@ -80,9 +80,7 @@ public abstract class MailboxSessionMapperFactory implements RequestAware, Mailb /** * Create a {@link MessageMapper} instance which will get reused during the whole {@link MailboxSession} * - * @param session * @return messageMapper - * @throws MailboxException */ public abstract MessageMapper createMessageMapper(MailboxSession session) throws MailboxException; @@ -102,16 +100,13 @@ public abstract class MailboxSessionMapperFactory implements RequestAware, Mailb /** * Create a {@link MailboxMapper} instance which will get reused during the whole {@link MailboxSession} * - * @param session * @return mailboxMapper - * @throws MailboxException */ public abstract MailboxMapper createMailboxMapper(MailboxSession session) throws MailboxException; /** * Create a {@link SubscriptionMapper} instance or return the one which exists for the {@link MailboxSession} already * - * @param session * @return mapper */ @Override @@ -126,9 +121,8 @@ public abstract class MailboxSessionMapperFactory implements RequestAware, Mailb /** * Create a {@link SubscriptionMapper} instance which will get reused during the whole {@link MailboxSession} - * @param session + * * @return subscriptionMapper - * @throws SubscriptionException */ public abstract SubscriptionMapper createSubscriptionMapper(MailboxSession session) throws SubscriptionException; @@ -138,8 +132,6 @@ public abstract class MailboxSessionMapperFactory implements RequestAware, Mailb /** * Call endRequest on {@link Mapper} instances - * - * @param session */ @Override public void endProcessingRequest(MailboxSession session) { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java index 4417e9e..22bf394 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java @@ -102,11 +102,8 @@ public class ResultUtils { /** * Return the {@link MessageResult} for the given {@link MailboxMessage} and {@link FetchGroup} - * - * @param message - * @param fetchGroup + * * @return result - * @throws MailboxException */ public static MessageResult loadMessageResult(MailboxMessage message, FetchGroup fetchGroup) throws MailboxException { try { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java index c76ae83..b86fc79 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java @@ -183,8 +183,6 @@ public class StoreMailboxManager implements MailboxManager { /** * Return the {@link MessageSearchIndex} used by this {@link MailboxManager} - * - * @return index */ public MessageSearchIndex getMessageSearchIndex() { return index; @@ -192,8 +190,6 @@ public class StoreMailboxManager implements MailboxManager { /** * Return the {@link MailboxSessionMapperFactory} used by this {@link MailboxManager} - * - * @return mailboxSessionMapperFactory */ public MailboxSessionMapperFactory getMapperFactory() { return mailboxSessionMapperFactory; @@ -216,9 +212,7 @@ public class StoreMailboxManager implements MailboxManager { } /** - * Generate an return the next uid validity - * - * @return uidValidity + * Generate and return the next uid validity */ protected int randomUidValidity() { return Math.abs(RANDOM.nextInt()); @@ -256,8 +250,6 @@ public class StoreMailboxManager implements MailboxManager { * Create a {@link MailboxManager} for the given Mailbox. By default this will return a {@link StoreMessageManager}. If * your implementation needs something different, just override this method * - * @param mailbox - * @param session * @return storeMailbox */ protected StoreMessageManager createMessageManager(Mailbox mailbox, MailboxSession session) throws MailboxException { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java index 76e5650..e52b2b7 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java @@ -51,7 +51,6 @@ import org.apache.james.mailbox.MailboxSession; import org.apache.james.mailbox.MessageManager; import org.apache.james.mailbox.MessageUid; import org.apache.james.mailbox.MetadataWithMailboxId; -import org.apache.james.mailbox.acl.UnionMailboxACLResolver; import org.apache.james.mailbox.events.EventBus; import org.apache.james.mailbox.events.MailboxIdRegistrationKey; import org.apache.james.mailbox.events.MailboxListener; @@ -104,6 +103,7 @@ import com.github.steveash.guavate.Guavate; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSortedMap; + import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -115,9 +115,6 @@ import reactor.core.scheduler.Schedulers; * This base class take care of dispatching events to the registered * {@link MailboxListener} and so help with handling concurrent * {@link MailboxSession}'s. - * - * - * */ public class StoreMessageManager implements MessageManager { private static final MailboxCounters ZERO_MAILBOX_COUNTERS = MailboxCounters.builder() @@ -194,8 +191,6 @@ public class StoreMessageManager implements MessageManager { /** * Return the {@link MailboxPathLocker} - * - * @return locker */ protected MailboxPathLocker getLocker() { return locker; @@ -203,9 +198,6 @@ public class StoreMessageManager implements MessageManager { /** * Return the underlying {@link Mailbox} - * - * @return mailbox - * @throws MailboxException */ public Mailbox getMailboxEntity() throws MailboxException { @@ -224,9 +216,6 @@ public class StoreMessageManager implements MessageManager { * override this method and add {@link Flag#USER} to the list of returned * {@link Flags}. If only a special set of user flags / keywords should be * allowed just add them directly. - * - * @param session - * @return flags */ protected Flags getPermanentFlags(MailboxSession session) { @@ -253,11 +242,6 @@ public class StoreMessageManager implements MessageManager { * * In this implementation, all permanent flags are shared, ergo we simply * return {@link #getPermanentFlags(MailboxSession)} - * - * @see UnionMailboxACLResolver#isReadWrite(MailboxACLRights, Flags) - * - * @param session - * @return */ protected Flags getSharedPermanentFlags(MailboxSession session) { return getPermanentFlags(session); @@ -618,9 +602,6 @@ public class StoreMessageManager implements MessageManager { * {@link Flag#RECENT} flag. * * This flag is never removed! - * - * @param flags - * @param session */ private void trimFlags(Flags flags, MailboxSession session) { @@ -675,11 +656,6 @@ public class StoreMessageManager implements MessageManager { /** * Copy the {@link MessageRange} to the {@link StoreMessageManager} - * - * @param set - * @param toMailbox - * @param session - * @throws MailboxException */ public List<MessageRange> copyTo(final MessageRange set, final StoreMessageManager toMailbox, final MailboxSession session) throws MailboxException { if (!toMailbox.isWriteable(session)) { @@ -694,11 +670,6 @@ public class StoreMessageManager implements MessageManager { /** * Move the {@link MessageRange} to the {@link StoreMessageManager} - * - * @param set - * @param toMailbox - * @param session - * @throws MailboxException */ public List<MessageRange> moveTo(final MessageRange set, final StoreMessageManager toMailbox, final MailboxSession session) throws MailboxException { if (!isWriteable(session)) { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java index b0685ed..8bc1f43 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java @@ -78,9 +78,6 @@ public class StoreMessageResultIterator implements MessageResultIterator { /** * Use the passed {@link FetchGroup} and calculate the right * {@link FetchType} for it - * - * @param group - * @return fetchType */ private static FetchType getFetchType(FetchGroup group) { int content = group.content(); diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreRightManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreRightManager.java index 4ad2342..d109b3f 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreRightManager.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreRightManager.java @@ -238,10 +238,8 @@ public class StoreRightManager implements RightManager { /** * Applies the global ACL (if there are any) to the mailbox ACL. * - * @param mailboxSession * @return the ACL of the present mailbox merged with the global ACL (if * there are any). - * @throws UnsupportedRightException */ public MailboxACL getResolvedMailboxACL(Mailbox mailbox, MailboxSession mailboxSession) throws UnsupportedRightException { MailboxACL acl = aclResolver.applyGlobalACL( diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreSubscriptionManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreSubscriptionManager.java index 2e46cde..4533368 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreSubscriptionManager.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreSubscriptionManager.java @@ -69,10 +69,6 @@ public class StoreSubscriptionManager implements SubscriptionManager { * Create Subscription for the given user and mailbox. By default a {@link SimpleSubscription} will get returned. * * If you need something more special just override this method - * - * @param session - * @param mailbox - * @return subscription */ protected Subscription createSubscription(MailboxSession session, String mailbox) { return new SimpleSubscription(session.getUser().asString(), mailbox); diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java index 4e72a8a..f51515b 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java @@ -25,7 +25,6 @@ import org.apache.james.mailbox.exception.MailboxException; import org.apache.james.mailbox.model.Mailbox; import org.apache.james.mailbox.model.MailboxId; - /** * Abstract base implementation of {@link ModSeqProvider} which uses the given {@link MailboxPathLocker} to lock the {@link Mailbox} during the mod-seq generation. */ @@ -52,11 +51,6 @@ public abstract class AbstractLockingModSeqProvider implements ModSeqProvider { /** * Generate the next mod-seq for the given {@link Mailbox} while holding a lock on it. - * - * @param session - * @param mailbox - * @return nextModSeq - * @throws MailboxException */ protected abstract long lockedNextModSeq(MailboxSession session, Mailbox mailbox) throws MailboxException; diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java index 66a6b29..e12b872 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java @@ -30,8 +30,6 @@ import org.apache.james.mailbox.model.MailboxId; /** * Abstract base implementation of {@link UidProvider} which used the given {@link MailboxPathLocker} to * lock the {@link Mailbox} while the next uid is generated - * - * */ public abstract class AbstractLockingUidProvider implements UidProvider { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapper.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapper.java index a283a83..d91e6ad 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapper.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapper.java @@ -39,58 +39,34 @@ public interface MailboxMapper extends Mapper { /** * Save the give {@link Mailbox} to the underlying storage - * - * @param mailbox - * @throws MailboxException */ MailboxId save(Mailbox mailbox) throws MailboxException; /** * Delete the given {@link Mailbox} from the underlying storage - * - * @param mailbox - * @throws MailboxException */ void delete(Mailbox mailbox) throws MailboxException; /** * Return the {@link Mailbox} for the given name - * - * @param mailboxName - * @return mailbox - * @throws MailboxException - * @throws MailboxNotFoundException */ Mailbox findMailboxByPath(MailboxPath mailboxName) throws MailboxException, MailboxNotFoundException; /** * Return the {@link Mailbox} for the given name - * - * @param mailboxId - * @return mailbox - * @throws MailboxException - * @throws MailboxNotFoundException */ Mailbox findMailboxById(MailboxId mailboxId) throws MailboxException, MailboxNotFoundException; /** * Return a List of {@link Mailbox} for the given userName and matching the right - * - * @param userName - * @return right - * @throws MailboxException */ List<Mailbox> findNonPersonalMailboxes(String userName, Right right) throws MailboxException; /** * Return a List of {@link Mailbox} which name is like the given name - * - * @param mailboxPath - * @return mailboxList - * @throws MailboxException */ List<Mailbox> findMailboxWithPathLike(MailboxPath mailboxPath) throws MailboxException; @@ -101,8 +77,6 @@ public interface MailboxMapper extends Mapper { * @param mailbox not null * @param delimiter path delimiter * @return true when the mailbox has children, false otherwise - * @throws MailboxException - * @throws MailboxNotFoundException */ boolean hasChildren(Mailbox mailbox, char delimiter) throws MailboxException, MailboxNotFoundException; @@ -124,10 +98,7 @@ public interface MailboxMapper extends Mapper { ACLDiff setACL(Mailbox mailbox, MailboxACL mailboxACL) throws MailboxException; /** - * Return a unmodifable {@link List} of all {@link Mailbox} - * - * @return mailboxList - * @throws MailboxException + * Return a unmodifable {@link List} of all {@link Mailbox} */ List<Mailbox> list() throws MailboxException; } \ No newline at end of file diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapperFactory.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapperFactory.java index 3dcb672..1482f8e 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapperFactory.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MailboxMapperFactory.java @@ -25,9 +25,6 @@ public interface MailboxMapperFactory { /** * Create a {@link MailboxMapper} instance or return the one which exists for the {@link MailboxSession} already - * - * @param session - * @return mapper */ MailboxMapper getMailboxMapper(MailboxSession session) throws MailboxException; } diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java index 3958e13..c17a018 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java @@ -49,10 +49,8 @@ public interface MessageMapper extends Mapper { * * @param mailbox The mailbox to search * @param set message range for batch processing - * @param type * @param limit the maximal limit of returned {@link MailboxMessage}'s. Use -1 to set no limit. In any case the caller MUST not expect the limit to get applied in all cases as the implementation * MAY just ignore it - * @throws MailboxException */ Iterator<MailboxMessage> findInMailbox(Mailbox mailbox, MessageRange set, FetchType type, int limit) throws MailboxException; @@ -64,20 +62,12 @@ public interface MessageMapper extends Mapper { /** * Return the count of messages in the mailbox - * - * @param mailbox - * @return count - * @throws MailboxException */ long countMessagesInMailbox(Mailbox mailbox) throws MailboxException; /** * Return the count of unseen messages in the mailbox - * - * @param mailbox - * @return unseenCount - * @throws MailboxException */ long countUnseenMessagesInMailbox(Mailbox mailbox) throws MailboxException; @@ -86,10 +76,6 @@ public interface MessageMapper extends Mapper { /** * Delete the given {@link MailboxMessage} - * - * @param mailbox - * @param message - * @throws MailboxException */ void delete(Mailbox mailbox, MailboxMessage message) throws MailboxException; @@ -101,11 +87,6 @@ public interface MessageMapper extends Mapper { /** * Return the uid of the first unseen message. If non can be found null will get returned - * - * - * @param mailbox - * @return uid or null - * @throws MailboxException */ MessageUid findFirstUnseenMessageUid(Mailbox mailbox) throws MailboxException; @@ -119,23 +100,13 @@ public interface MessageMapper extends Mapper { /** * Add the given {@link MailboxMessage} to the underlying storage. Be aware that implementation may choose to replace the uid of the given message while storing. * So you should only depend on the returned uid. - * - * - * @param mailbox - * @param message - * @return uid - * @throws MailboxException */ MessageMetaData add(Mailbox mailbox, MailboxMessage message) throws MailboxException; /** * Update flags for the given {@link MessageRange}. Only the flags may be modified after a message was saved to a mailbox. - * - * @param mailbox + * * @param flagsUpdateCalculator How to update flags - * @param set - * @return updatedFlags - * @throws MailboxException */ Iterator<UpdatedFlags> updateFlags(Mailbox mailbox, FlagsUpdateCalculator flagsUpdateCalculator, final MessageRange set) throws MailboxException; @@ -146,7 +117,6 @@ public interface MessageMapper extends Mapper { * * @param mailbox the Mailbox to copy to * @param original the original to copy - * @throws MailboxException */ MessageMetaData copy(Mailbox mailbox,MailboxMessage original) throws MailboxException; @@ -156,7 +126,6 @@ public interface MessageMapper extends Mapper { * * @param mailbox the Mailbox to move to * @param original the original to move - * @throws MailboxException */ MessageMetaData move(Mailbox mailbox,MailboxMessage original) throws MailboxException; diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapperFactory.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapperFactory.java index 47ba4b9..acf9166 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapperFactory.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapperFactory.java @@ -25,9 +25,6 @@ public interface MessageMapperFactory { /** * Create a {@link MessageMapper} instance of return the one which exists for the {@link MailboxSession} already - * - * @param session - * @return mapper */ MessageMapper getMessageMapper(MailboxSession session) throws MailboxException; diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ModSeqProvider.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ModSeqProvider.java index c7dc6c9..22d08e6 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ModSeqProvider.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ModSeqProvider.java @@ -26,8 +26,6 @@ import org.apache.james.mailbox.model.MailboxId; /** * Take care of provide mod-seqences for a given {@link Mailbox}. Be aware that implementations * need to be thread-safe! - * - * */ public interface ModSeqProvider { @@ -37,11 +35,6 @@ public interface ModSeqProvider { * one. * * The first mod-seq must be >= 1 - * - * @param session - * @param mailbox - * @return modSeq - * @throws MailboxException */ long nextModSeq(MailboxSession session, Mailbox mailbox) throws MailboxException; @@ -51,31 +44,16 @@ public interface ModSeqProvider { * one. * * The first mod-seq must be >= 1 - * - * @param session - * @param mailboxId - * @return modSeq - * @throws MailboxException */ long nextModSeq(MailboxSession session, MailboxId mailboxId) throws MailboxException; /** * Return the highest mod-sequence which were used for the {@link Mailbox} - * - * @param session - * @param mailbox - * @return highest - * @throws MailboxException */ long highestModSeq(MailboxSession session, Mailbox mailbox) throws MailboxException; /** * Return the highest mod-sequence which were used for the {@link Mailbox} - * - * @param session - * @param mailboxId - * @return highest - * @throws MailboxException */ long highestModSeq(MailboxSession session, MailboxId mailboxId) throws MailboxException; } diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java index 4eee5ba..de9f84b 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java @@ -29,8 +29,6 @@ import org.apache.james.mailbox.model.MailboxId; /** * Take care of provide uids for a given {@link Mailbox}. Be aware that implementations * need to be thread-safe! - * - * */ public interface UidProvider { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java index 7d0df02..2936f1e 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java @@ -36,8 +36,6 @@ public interface MailboxMessage extends Message, Comparable<MailboxMessage> { /** * Return the mailbox id of the linked mailbox - * - * @return mailboxId */ MailboxId getMailboxId(); @@ -52,70 +50,50 @@ public interface MailboxMessage extends Message, Comparable<MailboxMessage> { */ void setUid(MessageUid uid); - - /** * Set the mod-sequence for the message. This must be called before the message is added to the store * or any flags are changed. This must be unique / sequential. - * - * @param modSeq */ void setModSeq(long modSeq); /** * Return the mod-sequence for the message - * - * @return message */ long getModSeq(); /** * Return if it was marked as answered - * - * @return answered */ boolean isAnswered(); /** * Return if it was mark as deleted - * - * @return deleted */ boolean isDeleted(); /** * Return if it was mark as draft - * - * @return draft */ boolean isDraft(); /** * Return if it was flagged - * - * @return flagged */ boolean isFlagged(); /** * Return if it was marked as recent - * - * @return recent */ boolean isRecent(); /** * Return if it was marked as seen - * - * @return seen */ boolean isSeen(); /** - * Set the Flags - * - * @param flags + * Set the Flags */ void setFlags(Flags flags); diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java index b619e0b..3f46ad4 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java @@ -57,22 +57,16 @@ public interface Message { /** * The number of octets contained in the body of this document. - * - * @return number of octets */ long getBodyOctets(); /** * The number of octets contained in the full content of this document. - * - * @return number of octets */ long getFullContentOctets(); /** * The number of octets contained in the header content of this document. - * - * @return number of octets */ long getHeaderOctets(); @@ -88,20 +82,14 @@ public interface Message { * * Be aware that this method need to return a new fresh {@link InputStream} * on every call - * - * @return header - * @throws IOException */ InputStream getHeaderContent() throws IOException; /** - *Returns the full raw content of the MailboxMessage via an {@link InputStream}. + * Returns the full raw content of the MailboxMessage via an {@link InputStream}. * * Be aware that this method need to return a new fresh {@link InputStream} * on every call - * - * @return content - * @throws IOException */ InputStream getFullContent() throws IOException; diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java index 5ff778a..b02bbc4 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java @@ -128,7 +128,6 @@ public class MessageSearches implements Iterable<SimpleMessageSearchIndex.Search * <code>MailboxMessage</code>, not null * @return <code>true</code> if the row matches the given criteria, * <code>false</code> otherwise - * @throws MailboxException */ private boolean isMatch(MailboxMessage message) throws MailboxException { final List<SearchQuery.Criterion> criteria = query.getCriterias(); @@ -154,7 +153,6 @@ public class MessageSearches implements Iterable<SimpleMessageSearchIndex.Search * collection of recent message uids * @return <code>true</code> if the row matches the given criterion, * <code>false</code> otherwise - * @throws MailboxException */ public boolean isMatch(SearchQuery.Criterion criterion, MailboxMessage message, final Collection<MessageUid> recentMessageUids) throws MailboxException { @@ -411,13 +409,7 @@ public class MessageSearches implements Iterable<SimpleMessageSearchIndex.Search /** * Match against a {@link AddressType} header - * - * @param operator - * @param headerName - * @param message * @return containsAddress - * @throws MailboxException - * @throws IOException */ private boolean matchesAddress(SearchQuery.AddressOperator operator, String headerName, MailboxMessage message) throws MailboxException, IOException { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SearchUtil.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SearchUtil.java index 44519ed..4f28090 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SearchUtil.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SearchUtil.java @@ -38,8 +38,6 @@ import org.apache.james.mime4j.util.MimeUtil; /** * Utility class which helps with extracting of data for searches - * - * */ public class SearchUtil { @@ -85,7 +83,6 @@ public class SearchUtil { * o If none of the above conditions are met, the sort value for the * address is the empty string. * </p> - * @param mailbox * @return display */ public static String getDisplayAddress(Mailbox mailbox) { @@ -107,8 +104,7 @@ public class SearchUtil { * Parse the headerValue and delegate to {@link #getDisplayAddress(Mailbox)} * * If no display address is found an empty String is returned - * - * @param headerValue + * * @return display */ public static String getDisplayAddress(String headerValue) { @@ -137,8 +133,6 @@ public class SearchUtil { * See RFC5256 and RFC3501 * * Which is in fact the LocalPart - * @param mailbox - * @return addrMailbox */ public static String getMailboxAddress(Mailbox mailbox) { return mailbox.getLocalPart(); @@ -149,8 +143,7 @@ public class SearchUtil { * Parse the headerValue and delegate to {@link #getMailboxAddress(Mailbox)} * * If no mailbox name is found an empty String is returned - * - * @param headerValue + * * @return mailbox */ public static String getMailboxAddress(String headerValue) { @@ -232,8 +225,6 @@ public class SearchUtil { * (7) The resulting text is the "base subject" used in the SORT. * </p> * - * - * @param subject * @return baseSubject */ public static String getBaseSubject(String subject) { @@ -324,9 +315,7 @@ public class SearchUtil { * * BLOBCHAR = %x01-5a / %x5c / %x5e-7f * ; any CHAR except '[' and ']' - * - * - * @param subject + * * @return sub */ private static String removeSubjectBlob(String subject) { @@ -360,9 +349,7 @@ public class SearchUtil { * * BLOBCHAR = %x01-5a / %x5c / %x5e-7f * ; any CHAR except '[' and ']' - * - * - * @param subject + * * @return sub */ private static String removeSubjLeaders(String subject) { @@ -415,10 +402,8 @@ public class SearchUtil { * remove the remove_subj_trailers * * subj-trailer = "(fwd)" / WSP - * - * - * @param decodedSubject - * * @return sub + * + * @return sub */ private static String removeSubTrailers(String decodedSubject) { int subStringStart = 0; @@ -446,8 +431,7 @@ public class SearchUtil { * * BLOBCHAR = %x01-5a / %x5c / %x5e-7f * ; any CHAR except '[' and ']' - * - * @param subject + * * @return subj */ private static String removeBlob(String subject) { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/CountingInputStream.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/CountingInputStream.java index 9894ae6..e364198 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/CountingInputStream.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/CountingInputStream.java @@ -27,8 +27,6 @@ import java.io.InputStream; /** * {@link InputStream} implementation which just consume the the wrapped {@link InputStream} and count * the lines which are contained within the wrapped stream - * - * */ public final class CountingInputStream extends InputStream { @@ -75,7 +73,6 @@ public final class CountingInputStream extends InputStream { /** * Reads - and discards - the rest of the stream - * @throws IOException */ public void readAll() throws IOException { while (read() > 0) { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/FullByteContent.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/FullByteContent.java index 050c748..758db90 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/FullByteContent.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/FullByteContent.java @@ -33,7 +33,6 @@ import org.apache.james.mailbox.model.MessageResult.Header; /** * Abstract base class for {@link Content} implementations which hold the headers and * the body a email - * */ public class FullByteContent implements Content { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/InputStreamContent.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/InputStreamContent.java index f286536..c761560 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/InputStreamContent.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/streaming/InputStreamContent.java @@ -26,7 +26,6 @@ import org.apache.james.mailbox.store.mail.model.Message; /** * {@link Content} which is stored in a {@link InputStream} - * */ public final class InputStreamContent implements Content { diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/Mapper.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/Mapper.java index 22485c0..d5733bf 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/Mapper.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/Mapper.java @@ -23,7 +23,6 @@ import org.apache.james.mailbox.exception.MailboxException; /** * Mapper which execute units of work in a {@link Transaction} - * */ public interface Mapper { @@ -34,9 +33,6 @@ public interface Mapper { /** * Execute the given Transaction - * - * @param transaction - * @throws MailboxException */ <T> T execute(Transaction<T> transaction) throws MailboxException; @@ -48,8 +44,6 @@ public interface Mapper { /** * Run unit of work in a Transaction and return a value - * - * @throws MailboxException */ T run() throws MailboxException; } diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/TransactionalMapper.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/TransactionalMapper.java index 4a01c62..c9e53c6 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/TransactionalMapper.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/transaction/TransactionalMapper.java @@ -24,7 +24,6 @@ import org.apache.james.mailbox.exception.MailboxException; /** * * Run Transaction and handle begin, commit and rollback in the right order - * */ public abstract class TransactionalMapper implements Mapper { @@ -43,22 +42,16 @@ public abstract class TransactionalMapper implements Mapper { /** * Begin transaction - * - * @throws StorageException */ protected abstract void begin() throws MailboxException; /** * Commit transaction - * - * @throws StorageException */ protected abstract void commit() throws MailboxException; /** * Rollback transaction - * - * @throws StorageException */ protected abstract void rollback() throws MailboxException; diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/user/SubscriptionMapperFactory.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/user/SubscriptionMapperFactory.java index f451cae..b0dd7ec 100644 --- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/user/SubscriptionMapperFactory.java +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/user/SubscriptionMapperFactory.java @@ -25,9 +25,6 @@ public interface SubscriptionMapperFactory { /** * Create a {@link SubscriptionMapper} instance or return the one which exists for the {@link MailboxSession} already - * - * @param session - * @return mapper */ SubscriptionMapper getSubscriptionMapper(MailboxSession session) throws SubscriptionException; } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org