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 0b00da44a4022f00c67dadf71cb1fa08dc581d9d Author: Benoit Tellier <btell...@linagora.com> AuthorDate: Fri Nov 8 14:10:19 2019 +0700 [Refactoring] Resolve most warnings for mailbox-maildir javadoc --- .../james/mailbox/maildir/MaildirFolder.java | 37 ++++------------------ .../james/mailbox/maildir/MaildirMessageName.java | 1 - .../apache/james/mailbox/maildir/MaildirStore.java | 6 +--- .../maildir/user/MaildirSubscriptionMapper.java | 3 -- 4 files changed, 7 insertions(+), 40 deletions(-) diff --git a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java index e1d19a2..82b6816 100644 --- a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java +++ b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java @@ -112,8 +112,6 @@ public class MaildirFolder { * Returns whether the names of message files in this folder are parsed in * a strict manner ({@code true}), which means a size field and flags are * expected. - * - * @return */ public boolean isMessageNameStrictParse() { return messageNameStrictParse; @@ -124,7 +122,6 @@ public class MaildirFolder { * a strict manner ({@code true}), which means a size field and flags are * expected. * - * @param messageNameStrictParse */ public void setMessageNameStrictParse(boolean messageNameStrictParse) { this.messageNameStrictParse = messageNameStrictParse; @@ -220,8 +217,7 @@ public class MaildirFolder { /** * Read the lastUid of the given mailbox from the file system. - * - * @param session + * * @throws MailboxException if there are problems with the uidList file */ private void readLastUid(MailboxSession session) throws MailboxException { @@ -251,7 +247,6 @@ public class MaildirFolder { /** * Returns the uidValidity of this mailbox * @return The uidValidity - * @throws IOException */ public long getUidValidity() throws IOException { if (uidValidity == -1) { @@ -262,8 +257,6 @@ public class MaildirFolder { /** * Sets the uidValidity for this mailbox and writes it to the file system - * @param uidValidity - * @throws IOException */ public void setUidValidity(long uidValidity) throws IOException { saveUidValidity(uidValidity); @@ -292,8 +285,6 @@ public class MaildirFolder { /** * Save the given uidValidity to the file system - * @param uidValidity - * @throws IOException */ private void saveUidValidity(long uidValidity) throws IOException { File validityFile = new File(rootFolder, VALIDITY_FILE); @@ -307,8 +298,6 @@ public class MaildirFolder { /** * Sets the mailboxId for this mailbox and writes it to the file system - * @param mailboxId - * @throws IOException */ public void setMailboxId(MaildirId mailboxId) throws IOException { saveMailboxId(mailboxId); @@ -335,8 +324,6 @@ public class MaildirFolder { /** * Save the given MaildirId to the file system - * @param id - * @throws IOException */ private void saveMailboxId(MaildirId id) throws IOException { if (!mailboxIdFile.createNewFile()) { @@ -350,7 +337,6 @@ public class MaildirFolder { /** * Sets and returns a new uidValidity for this folder. * @return the new uidValidity - * @throws IOException */ private long resetUidValidity() throws IOException { // using the timestamp as uidValidity @@ -362,10 +348,9 @@ public class MaildirFolder { /** * Searches the uid list for a certain uid and returns the according {@link MaildirMessageName} * - * @param session * @param uid The uid to search for * @return The {@link MaildirMessageName} that belongs to the uid - * @throws IOException If the uidlist file cannot be found or read + * @throws MailboxException If the uidlist file cannot be found or read */ public MaildirMessageName getMessageNameByUid(final MailboxSession session, final MessageUid uid) throws MailboxException { @@ -405,7 +390,6 @@ public class MaildirFolder { * Reads all uids between the two boundaries from the folder and returns them as * a sorted map together with their corresponding {@link MaildirMessageName}s. * - * @param session * @param from The lower uid limit * @param to The upper uid limit. <code>-1</code> disables the upper limit * @return a {@link Map} whith all uids in the given range and associated {@link MaildirMessageName}s @@ -455,9 +439,7 @@ public class MaildirFolder { /** * Reads all uids from the uid list file which match the given filter * and returns as many of them as a sorted map as the limit specifies. - * - * - * @param session + * * @param filter The file names of all returned items match the filter. * The dir argument to {@link FilenameFilter}.accept(dir, name) will always be null. * @param limit The number of items; a limit smaller then 1 disables the limit @@ -487,8 +469,7 @@ public class MaildirFolder { /** * Creates a map of recent messages. - * - * @param session + * * @return A {@link Map} with all uids and associated {@link MaildirMessageName}s of recent messages * @throws MailboxException If there is a problem with the uid list file */ @@ -717,7 +698,6 @@ public class MaildirFolder { * Parses the header line in uid list files. * The format is: version lastUid messageCount (e.g. 1 615 273) * @param line The raw header line - * @throws IOException */ private void readUidListHeader(String line) throws IOException { if (line == null) { @@ -765,7 +745,7 @@ public class MaildirFolder { /** * Appends a message to the uidlist and returns its uid. - * @param session + * * @param name The name of the message's file * @return The uid of the message */ @@ -835,10 +815,6 @@ public class MaildirFolder { /** * Updates an entry in the uid list. - * @param session - * @param uid - * @param messageName - * @throws MailboxException */ public void update(MailboxSession session, final MessageUid uid, final String messageName) throws MailboxException { locker.executeWithLock(session, path, (LockAwareExecution<Void>) () -> { @@ -941,8 +917,7 @@ public class MaildirFolder { /** * Read the ACL of the given mailbox from the file system. - * - * @param session + * * @throws MailboxException if there are problems with the aclFile file */ private MailboxACL readACL(MailboxSession session) throws MailboxException { diff --git a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirMessageName.java b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirMessageName.java index 17bef1c..313edf9 100644 --- a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirMessageName.java +++ b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirMessageName.java @@ -293,7 +293,6 @@ public class MaildirMessageName { /** * Sets new flags for this message name. - * @param flags */ public void setFlags(Flags flags) { if (this.flags != flags) { diff --git a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirStore.java b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirStore.java index a9a28b1..b23f917 100644 --- a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirStore.java +++ b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirStore.java @@ -61,7 +61,6 @@ public class MaildirStore implements UidProvider, ModSeqProvider { * %fulluser * variables. * @param maildirLocation A String with variables - * @param locker */ public MaildirStore(String maildirLocation, MailboxPathLocker locker) { this.maildirLocation = maildirLocation; @@ -79,7 +78,7 @@ public class MaildirStore implements UidProvider, ModSeqProvider { /** * Create a {@link MaildirFolder} for a mailbox - * @param mailbox + * * @return The MaildirFolder */ public MaildirFolder createMaildirFolder(Mailbox mailbox) { @@ -282,7 +281,6 @@ public class MaildirStore implements UidProvider, ModSeqProvider { * Returns whether the names of message files in this store are parsed in * a strict manner ({@code true}), which means a size field and flags are * expected. - * @return */ public boolean isMessageNameStrictParse() { return messageNameStrictParse; @@ -294,8 +292,6 @@ public class MaildirStore implements UidProvider, ModSeqProvider { * expected. * * Default is {@code false}. - * - * @param messageNameStrictParse */ public void setMessageNameStrictParse(boolean messageNameStrictParse) { this.messageNameStrictParse = messageNameStrictParse; diff --git a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/user/MaildirSubscriptionMapper.java b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/user/MaildirSubscriptionMapper.java index aaf15bf..e06901a 100644 --- a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/user/MaildirSubscriptionMapper.java +++ b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/user/MaildirSubscriptionMapper.java @@ -115,7 +115,6 @@ public class MaildirSubscriptionMapper extends NonTransactionalMapper implements * Read the subscriptions for a particular user * @param user The user to get the subscriptions for * @return A Set of names of subscribed mailboxes of the user - * @throws SubscriptionException */ private Set<String> readSubscriptionsForUser(String user) throws SubscriptionException { File userRoot = new File(store.userRoot(user)); @@ -130,7 +129,6 @@ public class MaildirSubscriptionMapper extends NonTransactionalMapper implements * Read the names of the mailboxes which are subscribed from the specified folder * @param mailboxFolder The folder which contains the subscription file * @return A Set of names of subscribed mailboxes - * @throws IOException */ private Set<String> readSubscriptions(File mailboxFolder) throws IOException { File subscriptionFile = new File(mailboxFolder, FILE_SUBSCRIPTION); @@ -150,7 +148,6 @@ public class MaildirSubscriptionMapper extends NonTransactionalMapper implements * Write the set of mailbox names into the subscriptions file in the specified folder * @param mailboxFolder Folder which contains the subscriptions file * @param subscriptions Set of names of subscribed mailboxes - * @throws IOException */ private void writeSubscriptions(File mailboxFolder, Set<String> subscriptions) throws IOException { List<String> sortedSubscriptions = new ArrayList<>(subscriptions); --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org