james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r730692 - /james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxSessionImpl.java
Date Fri, 02 Jan 2009 10:48:10 GMT
Author: rdonkin
Date: Fri Jan  2 02:48:10 2009
New Revision: 730692

URL: http://svn.apache.org/viewvc?rev=730692&view=rev
Log:
Remove unneccesary parameters

Modified:
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxSessionImpl.java

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxSessionImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxSessionImpl.java?rev=730692&r1=730691&r2=730692&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxSessionImpl.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxSessionImpl.java
Fri Jan  2 02:48:10 2009
@@ -99,19 +99,19 @@
         final boolean sizeChanged = isSizeChanged();
         // New message response
         if (sizeChanged) {
-            addExistsResponses(results, mailbox);
+            addExistsResponses(results);
         }
         // Expunged messages
         if (!omitExpunged) {
-            addExpungedResponses(results, mailbox);
+            addExpungedResponses(results);
         }
         if (sizeChanged || (recentUidRemoved && !omitExpunged)) {
-            addRecentResponses(results, mailbox);
+            addRecentResponses(results);
             recentUidRemoved = false;
         }
 
         // Message updates
-        addFlagsResponses(results, useUid, mailbox);
+        addFlagsResponses(results, useUid);
 
         events.reset();
         return results;
@@ -131,7 +131,7 @@
         return events.isDeletedByOtherSession();
     }
 
-    private void addExpungedResponses(List responses, final Mailbox mailbox) {
+    private void addExpungedResponses(List responses) {
         for (Iterator it = events.expungedUids(); it.hasNext();) {
             final Long uid = (Long) it.next();
             final long uidValue = uid.longValue();
@@ -148,14 +148,13 @@
         }
     }
 
-    private void addFlagsResponses(final List responses, boolean useUid,
-            final Mailbox mailbox) {
+    private void addFlagsResponses(final List responses, boolean useUid) {
         try {
             for (final Iterator it = events.flagUpdateUids(); it.hasNext();) {
                 Long uid = (Long) it.next();
                 MessageRange messageSet = MessageRangeImpl.oneUid(uid
                         .longValue());
-                addFlagsResponses(responses, useUid, mailbox, messageSet);
+                addFlagsResponses(responses, useUid, messageSet);
             }
         } catch (MessagingException e) {
             final String message = "Failed to retrieve flags data";
@@ -163,11 +162,9 @@
         }
     }
 
-    private void addFlagsResponses(final List responses, boolean useUid,
-            final Mailbox mailbox, MessageRange messageSet)
+    private void addFlagsResponses(final List responses, boolean useUid, MessageRange messageSet)
             throws MailboxException {
-        final Iterator it = mailbox.getMessages(messageSet,
-                FetchGroupImpl.FLAGS, mailboxSession);
+        final Iterator it = mailbox.getMessages(messageSet, FetchGroupImpl.FLAGS, mailboxSession);
         while (it.hasNext()) {
             MessageResult mr = (MessageResult) it.next();
             final long uid = mr.getUid();
@@ -190,7 +187,7 @@
         }
     }
 
-    private void addRecentResponses(final List responses, final Mailbox mailbox) {
+    private void addRecentResponses(final List responses) {
         final int recentCount = recentCount();
         // TODO: use factory
         RecentResponse response = new RecentResponse(recentCount);
@@ -206,7 +203,7 @@
         responses.add(response);
     }
 
-    private void addExistsResponses(final List responses, final Mailbox mailbox) {
+    private void addExistsResponses(final List responses) {
         try {
             final int messageCount = mailbox.getMessageCount(mailboxSession);
             // TODO: use factory



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message