james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [5/6] james-project git commit: JAMES-2332 Minor cosmetic fixes
Date Thu, 08 Feb 2018 09:05:26 GMT
JAMES-2332 Minor cosmetic fixes


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/919d48da
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/919d48da
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/919d48da

Branch: refs/heads/master
Commit: 919d48dacfb95e63de2d4c0fd3886784a07c7c5d
Parents: ffe3467
Author: benwa <btellier@linagora.com>
Authored: Tue Feb 6 10:55:56 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Thu Feb 8 10:14:51 2018 +0700

----------------------------------------------------------------------
 .../java/org/apache/james/queue/jms/JMSMailQueue.java   | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/919d48da/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
b/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
index 81f4e38..19a4fe4 100644
--- a/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
+++ b/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
@@ -190,7 +190,6 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
     @Override
     public MailQueueItem deQueue() throws MailQueueException {
         Session session = null;
-        Message message;
         MessageConsumer consumer = null;
 
         while (true) {
@@ -200,7 +199,7 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
                 Queue queue = session.createQueue(queueName);
                 consumer = session.createConsumer(queue, getMessageSelector());
 
-                message = consumer.receive(10000);
+                Message message = consumer.receive(10000);
 
                 if (message != null) {
                     mailQueueSize.decrement();
@@ -220,7 +219,6 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
                 timeMetric.stopAndPublish();
             }
         }
-
     }
 
     @Override
@@ -474,7 +472,7 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
      * @throws MessagingException
      */
     protected MailQueueItem createMailQueueItem(Session session, MessageConsumer consumer,
Message message) throws JMSException, MessagingException {
-        final Mail mail = createMail(message);
+        Mail mail = createMail(message);
         JMSMailQueueItem jmsMailQueueItem = new JMSMailQueueItem(mail, session, consumer);
         return mailQueueItemDecoratorFactory.decorate(jmsMailQueueItem);
     }
@@ -488,7 +486,7 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
         QueueBrowser browser = null;
         try {
             browser = session.createBrowser(queue);
-            Enumeration enumeration = browser.getEnumeration();
+            Enumeration<?> enumeration = browser.getEnumeration();
             return Iterators.size(new EnumerationIterator(enumeration));
         } catch (Exception e) {
             LOGGER.error("Unable to get size of queue {}", queueName, e);
@@ -641,8 +639,8 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
         try {
             browser = session.createBrowser(queue);
 
-            final Enumeration<Message> messages = browser.getEnumeration();
-            final QueueBrowser myBrowser = browser;
+            Enumeration<Message> messages = browser.getEnumeration();
+            QueueBrowser myBrowser = browser;
 
             return new MailQueueIterator() {
 


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