james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject svn commit: r1726770 [1/3] - in /james/project/trunk: mailbox/api/src/main/java/org/apache/james/mailbox/model/ mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/ mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/ mailbox/hbase/s...
Date Tue, 26 Jan 2016 10:48:35 GMT
Author: matthieu
Date: Tue Jan 26 10:48:32 2016
New Revision: 1726770

URL: http://svn.apache.org/viewvc?rev=1726770&view=rev
Log:
JAMES-1669 remove useless local variables

Modified:
    james/project/trunk/mailbox/api/src/main/java/org/apache/james/mailbox/model/MessageRange.java
    james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
    james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMessage.java
    james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/model/HBaseMailbox.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailboxMessage.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java
    james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java
    james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMessageManager.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPASubscriptionManager.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAMailbox.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAProperty.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAUserFlag.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMailboxMessage.java
    james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/user/model/JPASubscription.java
    james/project/trunk/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPASubscriptionManagerTest.java
    james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java
    james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirSubscriptionManagerTest.java
    james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java
    james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MimeDescriptorImpl.java
    james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java
    james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java
    james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
    james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java
    james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/MessageBuilder.java
    james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java
    james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SimpleMailboxMembership.java
    james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/JDBCUtil.java
    james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/SqlResources.java
    james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java
    james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMESign.java
    james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/Sign.java
    james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/AggregateMailetdocsReport.java
    james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/DefaultDescriptorsExtractor.java
    james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/MailetdocsReport.java
    james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/Runner.java
    james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java
    james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
    james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSessionFactory.java
    james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/user/ScriptedUserAdder.java
    james/project/trunk/mpt/core/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java
    james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
    james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java
    james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
    james/project/trunk/protocols/api/src/main/java/org/apache/james/protocols/api/handler/CommandDispatcher.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/ImapSessionUtils.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/IdRange.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/response/StatusResponse.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/ImapRequestLineReader.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/IdleCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LsubCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UnselectCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/XListCommandParser.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/encode/EncoderUtils.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/main/DefaultImapDecoderFactory.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/AbstractListingResponse.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/CapabilityResponse.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/MoveProcessor.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchResponseBuilder.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MessageResultUtils.java
    james/project/trunk/protocols/imap/src/main/java/org/apache/james/protocols/imap/utils/DecoderUtils.java
    james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java
    james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FakeImapSession.java
    james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderEnvelopeTest.java
    james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
    james/project/trunk/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java
    james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
    james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataLineMessageHookHandler.java
    james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
    james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java
    james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/MaxRcptHandlerTest.java
    james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ResolvableEhloHeloHandlerTest.java
    james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ValidSenderDomainHandlerTest.java
    james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/JDBCUtil.java
    james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/SqlResources.java
    james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/MimeMessageStreamRepositorySource.java
    james/project/trunk/server/data/data-file/src/test/java/org/apache/james/domainlist/xml/XMLDomainListTest.java
    james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/mailrepository/jcr/JCRMailRepository.java
    james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/JCRUsersRepository.java
    james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/model/JCRUser.java
    james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/MimeMessageJDBCSource.java
    james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/user/jdbc/DefaultUsersJdbcRepository.java
    james/project/trunk/server/data/data-library/src/test/java/org/apache/james/mailrepository/mock/MockMailRepositoryStore.java
    james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailetManagement.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Forward.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCAlias.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCRecipientRewriteTable.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifyPostmaster.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifySender.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Redirect.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Resend.java
    james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/WhiteListManager.java
    james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/InSpammerBlacklistTest.java
    james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/RemoteAddrInNetworkTest.java
    james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/RemoteAddrNotInNetworkTest.java
    james/project/trunk/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/NettyImapSession.java
    james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SpamAssassinHandlerTest.java
    james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/URIRBLHandlerTest.java
    james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java
    james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java
    james/project/trunk/server/queue/queue-api/src/test/java/org/apache/james/queue/api/mock/MockMailQueue.java

Modified: james/project/trunk/mailbox/api/src/main/java/org/apache/james/mailbox/model/MessageRange.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/api/src/main/java/org/apache/james/mailbox/model/MessageRange.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/api/src/main/java/org/apache/james/mailbox/model/MessageRange.java (original)
+++ james/project/trunk/mailbox/api/src/main/java/org/apache/james/mailbox/model/MessageRange.java Tue Jan 26 10:48:32 2016
@@ -55,8 +55,7 @@ public class MessageRange implements Ite
      * @return not null
      */
     public static MessageRange one(long uid) {
-        final MessageRange result = new MessageRange(Type.ONE, uid, uid);
-        return result;
+        return new MessageRange(Type.ONE, uid, uid);
     }
 
     /**
@@ -65,8 +64,7 @@ public class MessageRange implements Ite
      * @return not null
      */
     public static MessageRange all() {
-        final MessageRange result = new MessageRange(Type.ALL, NOT_A_UID, MAX_UID);
-        return result;
+        return new MessageRange(Type.ALL, NOT_A_UID, MAX_UID);
     }
 
     /**

Modified: james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java (original)
+++ james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java Tue Jan 26 10:48:32 2016
@@ -80,7 +80,7 @@ public class HBaseMailboxManager extends
 
     @Override
     protected StoreMessageManager<HBaseId> createMessageManager(Mailbox<HBaseId> mailboxRow, MailboxSession session) throws MailboxException {
-        StoreMessageManager<HBaseId> result = new HBaseMessageManager(getMapperFactory(),
+        return new HBaseMessageManager(getMapperFactory(),
             getMessageSearchIndex(),
             getEventDispatcher(),
             getLocker(),
@@ -89,6 +89,5 @@ public class HBaseMailboxManager extends
             getGroupMembershipResolver(),
             getQuotaManager(),
             getQuotaRootResolver());
-        return result;
     }
 }

Modified: james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMessage.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMessage.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMessage.java (original)
+++ james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMessage.java Tue Jan 26 10:48:32 2016
@@ -334,19 +334,17 @@ public class HBaseMailboxMessage impleme
 
     @Override
     public String toString() {
-        final String retValue =
-                "message("
-                + "mailboxId = " + this.getMailboxId() + TOSTRING_SEPARATOR
-                + "uid = " + this.uid + TOSTRING_SEPARATOR
-                + "internalDate = " + this.internalDate + TOSTRING_SEPARATOR
-                + "answered = " + this.answered + TOSTRING_SEPARATOR
-                + "deleted = " + this.deleted + TOSTRING_SEPARATOR
-                + "draft = " + this.draft + TOSTRING_SEPARATOR
-                + "flagged = " + this.flagged + TOSTRING_SEPARATOR
-                + "recent = " + this.recent + TOSTRING_SEPARATOR
-                + "seen = " + this.seen + TOSTRING_SEPARATOR
-                + " )";
-        return retValue;
+        return "message("
+        + "mailboxId = " + this.getMailboxId() + TOSTRING_SEPARATOR
+        + "uid = " + this.uid + TOSTRING_SEPARATOR
+        + "internalDate = " + this.internalDate + TOSTRING_SEPARATOR
+        + "answered = " + this.answered + TOSTRING_SEPARATOR
+        + "deleted = " + this.deleted + TOSTRING_SEPARATOR
+        + "draft = " + this.draft + TOSTRING_SEPARATOR
+        + "flagged = " + this.flagged + TOSTRING_SEPARATOR
+        + "recent = " + this.recent + TOSTRING_SEPARATOR
+        + "seen = " + this.seen + TOSTRING_SEPARATOR
+        + " )";
     }
 
     @Override

Modified: james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/model/HBaseMailbox.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/model/HBaseMailbox.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/model/HBaseMailbox.java (original)
+++ james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/model/HBaseMailbox.java Tue Jan 26 10:48:32 2016
@@ -130,14 +130,13 @@ public class HBaseMailbox implements Mai
 
     @Override
     public String toString() {
-        final String retValue = "Mailbox ( "
+        return "Mailbox ( "
                 + "mailboxId = " + this.mailboxId + TAB
 //                + "namespace = " + this.namespace + TAB
                 + "name = " + this.name + TAB
 //                + "user = " + this.user + TAB
                 + "uidValidity = " + this.uidValidity + TAB
                 + " )";
-        return retValue;
     }
 
     @Override

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java Tue Jan 26 10:48:32 2016
@@ -59,20 +59,17 @@ public class JCRMailboxSessionMapperFact
     
     @Override
     public MailboxMapper<JCRId> createMailboxMapper(MailboxSession session) throws MailboxException {
-        JCRMailboxMapper mapper = new JCRMailboxMapper(repository, session, scaling);
-        return mapper;
+        return new JCRMailboxMapper(repository, session, scaling);
     }
 
     @Override
     public MessageMapper<JCRId> createMessageMapper(MailboxSession session) throws MailboxException {
-        JCRMessageMapper messageMapper = new JCRMessageMapper(repository, session, uidProvider, modSeqProvider,  messageScaling);
-        return messageMapper;
+        return new JCRMessageMapper(repository, session, uidProvider, modSeqProvider,  messageScaling);
     }
 
     @Override
     public SubscriptionMapper createSubscriptionMapper(MailboxSession session) throws SubscriptionException {
-        JCRSubscriptionMapper mapper = new JCRSubscriptionMapper(repository, session, DEFAULT_SCALING);
-        return mapper;
+        return new JCRSubscriptionMapper(repository, session, DEFAULT_SCALING);
     }
     
     public MailboxSessionJCRRepository getRepository() {

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java Tue Jan 26 10:48:32 2016
@@ -57,9 +57,8 @@ public class JCRMessageManager extends S
 
     @Override
     protected MailboxMessage<JCRId> createMessage(Date internalDate, int size, int bodyStartOctet, SharedInputStream content, Flags flags, PropertyBuilder propertyBuilder) throws MailboxException{
-        final MailboxMessage<JCRId> message = new JCRMailboxMessage(getMailboxEntity().getMailboxId(), internalDate,
+        return new JCRMailboxMessage(getMailboxEntity().getMailboxId(), internalDate,
                 size, flags, content, bodyStartOctet, propertyBuilder, log);
-        return message;
     }
 
     /**

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java Tue Jan 26 10:48:32 2016
@@ -164,12 +164,11 @@ public class JCRMailbox implements Mailb
     
     @Override
     public String toString() {
-        final String retValue = "Mailbox ( "
+        return "Mailbox ( "
             + "mailboxUID = " + this.getMailboxId() + TAB
             + "name = " + this.getName() + TAB
             + "uidValidity = " + this.getUidValidity() + TAB
             + " )";
-        return retValue;
     }
     
     @Override

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailboxMessage.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailboxMessage.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailboxMessage.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailboxMessage.java Tue Jan 26 10:48:32 2016
@@ -587,22 +587,20 @@ public class JCRMailboxMessage implement
 
 
     public String toString() {
-        final String retValue = 
-            "message("
-            + "uuid = " + getUUID()
-            + "mailboxUUID = " + this.getMailboxId() + TOSTRING_SEPARATOR
-            + "uuid = " + this.getId() + TOSTRING_SEPARATOR
-            + "internalDate = " + this.getInternalDate() + TOSTRING_SEPARATOR
-            + "size = " + this.getFullContentOctets() + TOSTRING_SEPARATOR
-            + "answered = " + this.isAnswered() + TOSTRING_SEPARATOR
-            + "deleted = " + this.isDeleted() + TOSTRING_SEPARATOR
-            + "draft = " + this.isDraft() + TOSTRING_SEPARATOR
-            + "flagged = " + this.isFlagged() + TOSTRING_SEPARATOR
-            + "recent = " + this.isRecent() + TOSTRING_SEPARATOR
-            + "seen = " + this.isSeen() + TOSTRING_SEPARATOR
-            + " )";
 
-        return retValue;
+        return "message("
+        + "uuid = " + getUUID()
+        + "mailboxUUID = " + this.getMailboxId() + TOSTRING_SEPARATOR
+        + "uuid = " + this.getId() + TOSTRING_SEPARATOR
+        + "internalDate = " + this.getInternalDate() + TOSTRING_SEPARATOR
+        + "size = " + this.getFullContentOctets() + TOSTRING_SEPARATOR
+        + "answered = " + this.isAnswered() + TOSTRING_SEPARATOR
+        + "deleted = " + this.isDeleted() + TOSTRING_SEPARATOR
+        + "draft = " + this.isDraft() + TOSTRING_SEPARATOR
+        + "flagged = " + this.isFlagged() + TOSTRING_SEPARATOR
+        + "recent = " + this.isRecent() + TOSTRING_SEPARATOR
+        + "seen = " + this.isSeen() + TOSTRING_SEPARATOR
+        + " )";
     }
 
 
@@ -611,8 +609,7 @@ public class JCRMailboxMessage implement
         if (isPersistent()) {
             try {
                 //TODO: Maybe we should cache this somehow...
-                InputStream contentStream = node.getNode(JcrConstants.JCR_CONTENT).getProperty(JcrConstants.JCR_DATA).getBinary().getStream();
-                return contentStream;
+                return node.getNode(JcrConstants.JCR_CONTENT).getProperty(JcrConstants.JCR_DATA).getBinary().getStream();
             } catch (RepositoryException e) {
                 throw new IOException("Unable to retrieve property " + JcrConstants.JCR_CONTENT, e);
             }

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java Tue Jan 26 10:48:32 2016
@@ -220,12 +220,11 @@ public class JCRProperty implements JCRI
      * of this object.
      */
     public String toString() {
-        final String result = "Property ( "
+
+        return "Property ( "
             + "localName = " + this.getLocalName() + " "
             + "namespace = " + this.getNamespace() + " "
-            + "value = " + this.getValue() 
+            + "value = " + this.getValue()
             + " )";
-    
-        return result;
     }
 }

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java Tue Jan 26 10:48:32 2016
@@ -107,8 +107,7 @@ public class JCRSubscriptionMapper exten
             
             NodeIterator nodeIt = result.getNodes();
             if (nodeIt.hasNext()) {
-                JCRSubscription sub = new JCRSubscription(nodeIt.nextNode(), mailbox, getLogger());
-                return sub;
+                return new JCRSubscription(nodeIt.nextNode(), mailbox, getLogger());
             }
             
         } catch (PathNotFoundException e) {

Modified: james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java (original)
+++ james/project/trunk/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java Tue Jan 26 10:48:32 2016
@@ -170,12 +170,11 @@ public class JCRSubscription implements
      * @return output suitable for debugging
      */
     public String toString() {
-        final String result = "Subscription ( "
+
+        return "Subscription ( "
             + "user = " + this.getUser() + TOSTRING_SEPARATOR
             + "mailbox = " + this.getMailbox() + TOSTRING_SEPARATOR
             + " )";
-    
-        return result;
     }
     
 

Modified: james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java (original)
+++ james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRSubscriptionManagerTest.java Tue Jan 26 10:48:32 2016
@@ -63,8 +63,7 @@ public class JCRSubscriptionManagerTest
     public SubscriptionManager createSubscriptionManager() {
         MailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass);
         JCRMailboxSessionMapperFactory mf = new JCRMailboxSessionMapperFactory(sessionRepos, null, null);
-        JCRSubscriptionManager sm = new JCRSubscriptionManager(mf);
-        return sm;
+        return new JCRSubscriptionManager(mf);
     }
 
 }

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMessageManager.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMessageManager.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMessageManager.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMessageManager.java Tue Jan 26 10:48:32 2016
@@ -59,8 +59,7 @@ public class JPAMessageManager extends S
     protected MailboxMessage<JPAId> createMessage(Date internalDate, final int size, int bodyStartOctet, final SharedInputStream content,
                                                   final Flags flags, PropertyBuilder propertyBuilder) throws MailboxException{
 
-        final MailboxMessage<JPAId> message = new JPAMailboxMessage((JPAMailbox) getMailboxEntity(), internalDate, size, flags, content,  bodyStartOctet,  propertyBuilder);
-        return message;
+        return new JPAMailboxMessage((JPAMailbox) getMailboxEntity(), internalDate, size, flags, content,  bodyStartOctet,  propertyBuilder);
     }
 
 

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPASubscriptionManager.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPASubscriptionManager.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPASubscriptionManager.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPASubscriptionManager.java Tue Jan 26 10:48:32 2016
@@ -37,7 +37,6 @@ public class JPASubscriptionManager exte
      * @see org.apache.james.mailbox.store.StoreSubscriptionManager#createSubscription(org.apache.james.mailbox.MailboxSession, java.lang.String)
      */
     protected Subscription createSubscription(final MailboxSession session, final String mailbox) {
-        final Subscription newSubscription = new JPASubscription(session.getUser().getUserName(), mailbox);
-        return newSubscription;
+        return new JPASubscription(session.getUser().getUserName(), mailbox);
     }
 }

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAMailbox.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAMailbox.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAMailbox.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAMailbox.java Tue Jan 26 10:48:32 2016
@@ -141,12 +141,11 @@ public class JPAMailbox implements Mailb
 
     @Override
     public String toString() {
-        final String retValue = "Mailbox ( "
+        return "Mailbox ( "
             + "mailboxId = " + this.mailboxId + TAB
             + "name = " + this.name + TAB
             + "uidValidity = " + this.uidValidity + TAB
             + " )";
-        return retValue;
     }
 
     @Override

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAProperty.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAProperty.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAProperty.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAProperty.java Tue Jan 26 10:48:32 2016
@@ -171,10 +171,8 @@ public class JPAProperty implements Prop
      * @return a <code>String</code> representation of this object.
      */
     public String toString() {
-        final String result = "JPAProperty ( " + "id = " + this.id + " " + "localName = " + this.localName + " "
+        return "JPAProperty ( " + "id = " + this.id + " " + "localName = " + this.localName + " "
                 + "namespace = " + this.namespace + " " + "value = " + this.value + " )";
-
-        return result;
     }
 
 }

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAUserFlag.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAUserFlag.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAUserFlag.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/JPAUserFlag.java Tue Jan 26 10:48:32 2016
@@ -105,12 +105,10 @@ public class JPAUserFlag {
      * of this object.
      */
     public String toString() {
-        final String result = "JPAUserFlag ( "
+        return "JPAUserFlag ( "
             + "id = " + this.id + " "
             + "name = " + this.name
             + " )";
-    
-        return result;
     }
     
 }

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMailboxMessage.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMailboxMessage.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMailboxMessage.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMailboxMessage.java Tue Jan 26 10:48:32 2016
@@ -560,19 +560,17 @@ public abstract class AbstractJPAMailbox
     }
 
     public String toString() {
-        final String retValue = 
-            "message("
-            + "mailboxId = " + this.getMailboxId() + TOSTRING_SEPARATOR
-            + "uid = " + this.uid + TOSTRING_SEPARATOR
-            + "internalDate = " + this.internalDate + TOSTRING_SEPARATOR
-            + "answered = " + this.answered + TOSTRING_SEPARATOR
-            + "deleted = " + this.deleted + TOSTRING_SEPARATOR
-            + "draft = " + this.draft + TOSTRING_SEPARATOR
-            + "flagged = " + this.flagged + TOSTRING_SEPARATOR
-            + "recent = " + this.recent + TOSTRING_SEPARATOR
-            + "seen = " + this.seen + TOSTRING_SEPARATOR
-            + " )";
-        return retValue;
+        return "message("
+        + "mailboxId = " + this.getMailboxId() + TOSTRING_SEPARATOR
+        + "uid = " + this.uid + TOSTRING_SEPARATOR
+        + "internalDate = " + this.internalDate + TOSTRING_SEPARATOR
+        + "answered = " + this.answered + TOSTRING_SEPARATOR
+        + "deleted = " + this.deleted + TOSTRING_SEPARATOR
+        + "draft = " + this.draft + TOSTRING_SEPARATOR
+        + "flagged = " + this.flagged + TOSTRING_SEPARATOR
+        + "recent = " + this.recent + TOSTRING_SEPARATOR
+        + "seen = " + this.seen + TOSTRING_SEPARATOR
+        + " )";
     }
     
 

Modified: james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/user/model/JPASubscription.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/user/model/JPASubscription.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/user/model/JPASubscription.java (original)
+++ james/project/trunk/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/user/model/JPASubscription.java Tue Jan 26 10:48:32 2016
@@ -127,12 +127,11 @@ public class JPASubscription implements
      * @return output suitable for debugging
      */
     public String toString() {
-        final String result = "Subscription ( "
+        return "Subscription ( "
             + "id = " + this.id + TO_STRING_SEPARATOR
             + "user = " + this.username + TO_STRING_SEPARATOR
             + "mailbox = " + this.mailbox + TO_STRING_SEPARATOR
             + " )";
-        return result;
     }
     
 }

Modified: james/project/trunk/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPASubscriptionManagerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPASubscriptionManagerTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPASubscriptionManagerTest.java (original)
+++ james/project/trunk/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPASubscriptionManagerTest.java Tue Jan 26 10:48:32 2016
@@ -69,9 +69,7 @@ public class JPASubscriptionManagerTest
 
         JPAMailboxSessionMapperFactory mf = new JPAMailboxSessionMapperFactory(entityManagerFactory, new JPAUidProvider(locker, entityManagerFactory), new JPAModSeqProvider(locker, entityManagerFactory));
 
-        JPASubscriptionManager sm = new JPASubscriptionManager(mf);
-        
-        return sm;
+        return new JPASubscriptionManager(mf);
     }
 
     @After

Modified: james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java (original)
+++ james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java Tue Jan 26 10:48:32 2016
@@ -76,8 +76,7 @@ public class MaildirMessageMapper extend
         if (newFiles == null || curFiles == null)
             throw new MailboxException("Unable to count messages in Mailbox " + mailbox, new IOException(
                     "Not a valid Maildir folder: " + maildirStore.getFolderName(mailbox)));
-        int count = newFiles.length + curFiles.length;
-        return count;
+        return newFiles.length + curFiles.length;
     }
 
     /**
@@ -93,8 +92,7 @@ public class MaildirMessageMapper extend
         if (newUnseenMessages == null || unseenMessages == null)
             throw new MailboxException("Unable to count unseen messages in Mailbox " + mailbox, new IOException(
                     "Not a valid Maildir folder: " + maildirStore.getFolderName(mailbox)));
-        int count = newUnseenMessages.length + unseenMessages.length;
-        return count;
+        return newUnseenMessages.length + unseenMessages.length;
     }
 
     /**

Modified: james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirSubscriptionManagerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirSubscriptionManagerTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirSubscriptionManagerTest.java (original)
+++ james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirSubscriptionManagerTest.java Tue Jan 26 10:48:32 2016
@@ -29,8 +29,7 @@ public class MaildirSubscriptionManagerT
     public SubscriptionManager createSubscriptionManager() {
         MaildirStore store = new MaildirStore("target/Maildir/%domain/%user", new JVMMailboxPathLocker());
         MaildirMailboxSessionMapperFactory factory = new MaildirMailboxSessionMapperFactory(store);
-        StoreSubscriptionManager sm = new StoreSubscriptionManager(factory);
-        return sm;
+        return new StoreSubscriptionManager(factory);
     }
 
 }

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java Tue Jan 26 10:48:32 2016
@@ -161,9 +161,7 @@ public class MessageResultImpl implement
     public String toString() {
         final String TAB = " ";
 
-        String retValue = "MessageResultImpl ( " + "uid = " + getUid() + TAB + "flags = " + getFlags() + TAB + "size = " + getSize() + TAB + "internalDate = " + getInternalDate()+ ")";
-
-        return retValue;
+        return "MessageResultImpl ( " + "uid = " + getUid() + TAB + "flags = " + getFlags() + TAB + "size = " + getSize() + TAB + "internalDate = " + getInternalDate()+ ")";
     }
 
     /**

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MimeDescriptorImpl.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MimeDescriptorImpl.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MimeDescriptorImpl.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MimeDescriptorImpl.java Tue Jan 26 10:48:32 2016
@@ -184,12 +184,11 @@ public class MimeDescriptorImpl implemen
         final Collection<MimeDescriptor> parts = new ArrayList<MimeDescriptor>();
         final String location = descriptor.getContentLocation();
         final String md5 = descriptor.getContentMD5Raw();
-        final MimeDescriptorImpl mimeDescriptorImpl = new MimeDescriptorImpl(
+        return new MimeDescriptorImpl(
                 bodyOctets, contentDescription, contentId, lines, subType,
                 type, transferEncoding, headers, contentTypeParameters,
                 languages, disposition, dispositionParams, embeddedMessage,
                 parts, location, md5);
-        return mimeDescriptorImpl;
     }
 
     private final long bodyOctets;

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java Tue Jan 26 10:48:32 2016
@@ -121,10 +121,8 @@ public class SimpleMailboxSession implem
     public String toString() {
         final String TAB = " ";
 
-        String retValue = "MailboxSession ( " + "sessionId = "
+        return "MailboxSession ( " + "sessionId = "
                 + this.sessionId + TAB + "open = " + this.open + TAB + " )";
-
-        return retValue;
     }
     
     /**

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java Tue Jan 26 10:48:32 2016
@@ -457,8 +457,7 @@ public class PropertyBuilder {
      * @return not null
      */
     public List<Property> toProperties() {
-        final List<Property> results = new ArrayList<Property>(properties);
-        return results;
+        return new ArrayList<Property>(properties);
     }
 
     /**

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java Tue Jan 26 10:48:32 2016
@@ -68,8 +68,7 @@ public class ListeningCurrentQuotaUpdate
         }
     }
 
-    private void handleExpungedEvent(Expunged event, QuotaRoot quotaRoot) throws MailboxException {
-        Expunged expunged = event;
+    private void handleExpungedEvent(Expunged expunged, QuotaRoot quotaRoot) throws MailboxException {
         long addedSize = 0;
         long addedCount = 0;
         List<Long> uids = expunged.getUids();
@@ -83,8 +82,7 @@ public class ListeningCurrentQuotaUpdate
         }
     }
 
-    private void handleAddedEvent(Added event, QuotaRoot quotaRoot) throws MailboxException {
-        Added added = event;
+    private void handleAddedEvent(Added added, QuotaRoot quotaRoot) throws MailboxException {
         long addedSize = 0;
         long addedCount = 0;
         List<Long> uids = added.getUids();

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/MessageSearches.java Tue Jan 26 10:48:32 2016
@@ -205,8 +205,7 @@ public class MessageSearches implements
 
     protected boolean bodyContains(String value, MailboxMessage<?> message, Logger log) throws IOException, MimeException {
         final InputStream input = message.getFullContent();
-        final boolean result = isInMessage(value, input, false, log);
-        return result;
+        return isInMessage(value, input, false, log);
     }
 
     protected boolean isInMessage(String value, final InputStream input, boolean header, Logger log) throws IOException, MimeException {
@@ -222,8 +221,7 @@ public class MessageSearches implements
 
     protected boolean messageContains(String value, MailboxMessage<?> message, Logger log) throws IOException, MimeException {
         final InputStream input = message.getFullContent();
-        final boolean result = isInMessage(value, input, true, log);
-        return result;
+        return isInMessage(value, input, true, log);
     }
 
     private boolean matches(SearchQuery.ConjunctionCriterion criterion, MailboxMessage<?> message,
@@ -313,8 +311,7 @@ public class MessageSearches implements
         final SearchQuery.BooleanOperator operator = criterion.getOperator();
         final boolean isSet = operator.isSet();
         final String flag = criterion.getFlag();
-        final boolean result = isSet == message.createFlags().contains(flag);
-        return result;
+        return isSet == message.createFlags().contains(flag);
     }
 
     private boolean matches(SearchQuery.UidCriterion criterion, MailboxMessage<?> message) {
@@ -520,8 +517,7 @@ public class MessageSearches implements
     private boolean matches(SearchQuery.InternalDateCriterion criterion, MailboxMessage<?> message)
             throws UnsupportedSearchException {
         final SearchQuery.DateOperator operator = criterion.getOperator();
-        final boolean result = matchesInternalDate(operator, message);
-        return result;
+        return matchesInternalDate(operator, message);
     }
 
     private boolean matchesInternalDate(final SearchQuery.DateOperator operator, final MailboxMessage<?> message)

Modified: james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/MessageBuilder.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/MessageBuilder.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/MessageBuilder.java (original)
+++ james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/MessageBuilder.java Tue Jan 26 10:48:32 2016
@@ -38,8 +38,7 @@ public class MessageBuilder {
     public int lineNumber = 0;
     
     public MailboxMessage<TestId> build() throws Exception {
-        MailboxMessage<TestId> result = new SimpleMailboxMembership(mailboxId, uid, -1,  internalDate, size, flags, body, headers);
-        return result;
+        return new SimpleMailboxMembership(mailboxId, uid, -1,  internalDate, size, flags, body, headers);
     }
     
     public void header(String field, String value) {

Modified: james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java (original)
+++ james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java Tue Jan 26 10:48:32 2016
@@ -740,17 +740,14 @@ public class SearchUtilsTest {
     }
     
     private SearchQuery.NumericRange[] range(long low, long high) {
-        SearchQuery.NumericRange[] results = { new SearchQuery.NumericRange(
-                low, high) };
-        return results;
+        return new SearchQuery.NumericRange[]{ new SearchQuery.NumericRange(low, high) };
     }
 
     private SearchQuery.NumericRange[] range(long lowOne, long highOne,
             long lowTwo, long highTwo) {
-        SearchQuery.NumericRange[] results = {
+        return new SearchQuery.NumericRange[]{
                 new SearchQuery.NumericRange(lowOne, highOne),
                 new SearchQuery.NumericRange(lowTwo, highTwo) };
-        return results;
     }
     
     

Modified: james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SimpleMailboxMembership.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SimpleMailboxMembership.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SimpleMailboxMembership.java (original)
+++ james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/SimpleMailboxMembership.java Tue Jan 26 10:48:32 2016
@@ -61,11 +61,10 @@ public class SimpleMailboxMembership imp
         this.internalDate = internalDate;
         this.size = size;
         this.body = body;
-        final Map<String,String> originalHeaders = headers;
-        if (originalHeaders == null) {
+        if (headers == null) {
             this.headers = new HashMap<String,String>();
         } else {
-            this.headers = originalHeaders;
+            this.headers = headers;
         }
         
         this.body =  body;
@@ -171,23 +170,19 @@ public class SimpleMailboxMembership imp
         return true;
     }
 
-    public String toString()
-    {
-        final String retValue = 
-            "mailbox("
-            + "mailboxId = " + this.mailboxId + TOSTRING_SEPARATOR
-            + "uid = " + this.uid + TOSTRING_SEPARATOR
-            + "internalDate = " + this.internalDate + TOSTRING_SEPARATOR
-            + "size = " + this.size + TOSTRING_SEPARATOR
-            + "answered = " + this.answered + TOSTRING_SEPARATOR
-            + "deleted = " + this.deleted + TOSTRING_SEPARATOR
-            + "draft = " + this.draft + TOSTRING_SEPARATOR
-            + "flagged = " + this.flagged + TOSTRING_SEPARATOR
-            + "recent = " + this.recent + TOSTRING_SEPARATOR
-            + "seen = " + this.seen + TOSTRING_SEPARATOR
-            + " )";
-
-        return retValue;
+    public String toString() {
+        return "mailbox("
+        + "mailboxId = " + this.mailboxId + TOSTRING_SEPARATOR
+        + "uid = " + this.uid + TOSTRING_SEPARATOR
+        + "internalDate = " + this.internalDate + TOSTRING_SEPARATOR
+        + "size = " + this.size + TOSTRING_SEPARATOR
+        + "answered = " + this.answered + TOSTRING_SEPARATOR
+        + "deleted = " + this.deleted + TOSTRING_SEPARATOR
+        + "draft = " + this.draft + TOSTRING_SEPARATOR
+        + "flagged = " + this.flagged + TOSTRING_SEPARATOR
+        + "recent = " + this.recent + TOSTRING_SEPARATOR
+        + "seen = " + this.seen + TOSTRING_SEPARATOR
+        + " )";
     }
 
     

Modified: james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/JDBCUtil.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/JDBCUtil.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/JDBCUtil.java (original)
+++ james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/JDBCUtil.java Tue Jan 26 10:48:32 2016
@@ -100,8 +100,7 @@ final class JDBCUtil {
     public boolean tableExistsCaseSensitive(DatabaseMetaData dbMetaData, String tableName) throws SQLException {
         ResultSet rsTables = dbMetaData.getTables(null, null, tableName, null);
         try {
-            boolean found = rsTables.next();
-            return found;
+            return rsTables.next();
         } finally {
             closeJDBCResultSet(rsTables);
         }
@@ -147,8 +146,7 @@ final class JDBCUtil {
     public boolean columnExistsCaseSensitive(DatabaseMetaData dbMetaData, String tableName, String columnName) throws SQLException {
         ResultSet rsTables = dbMetaData.getColumns(null, null, tableName, columnName);
         try {
-            boolean found = rsTables.next();
-            return found;
+            return rsTables.next();
         } finally {
             closeJDBCResultSet(rsTables);
         }

Modified: james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/SqlResources.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/SqlResources.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/SqlResources.java (original)
+++ james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/SqlResources.java Tue Jan 26 10:48:32 2016
@@ -340,8 +340,7 @@ class SqlResources {
             index = input.indexOf(find, index + find_length);
         }
 
-        String result = output.toString();
-        return result;
+        return output.toString();
     }
 
     /**

Modified: james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java (original)
+++ james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java Tue Jan 26 10:48:32 2016
@@ -193,8 +193,7 @@ public class KeyStoreHolder {
         
         try {
             CertPathBuilderResult result = pathBuilder.build(params);
-            CertPath path = result.getCertPath();
-            return path;
+            return result.getCertPath();
         } catch (CertPathBuilderException e) {
             // A certification path is not found, so null is returned.
             return null;

Modified: james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMESign.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMESign.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMESign.java (original)
+++ james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMESign.java Tue Jan 26 10:48:32 2016
@@ -67,7 +67,7 @@ public class SMIMESign extends Sign {
      *
      */
     protected  String[] getAllowedInitParameters() {
-        String[] allowedArray = {
+        return new String[]{
             "debug",
             "keyStoreFileName",
             "keyStorePassword",
@@ -79,7 +79,6 @@ public class SMIMESign extends Sign {
             "rebuildFrom",
             "explanationText"
         };
-        return allowedArray;
     }
     
      /* ******************************************************************** */

Modified: james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/Sign.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/Sign.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/Sign.java (original)
+++ james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/Sign.java Tue Jan 26 10:48:32 2016
@@ -73,7 +73,7 @@ public class Sign extends AbstractSign {
      *
      */
     protected  String[] getAllowedInitParameters() {
-        String[] allowedArray = {
+        return new String[]{
             "keyHolderClass",
             "debug",
             "keyStoreFileName",
@@ -86,7 +86,6 @@ public class Sign extends AbstractSign {
             "rebuildFrom",
             "explanationText"
         };
-        return allowedArray;
     }
     
      /* ******************************************************************** */

Modified: james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/AggregateMailetdocsReport.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/AggregateMailetdocsReport.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/AggregateMailetdocsReport.java (original)
+++ james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/AggregateMailetdocsReport.java Tue Jan 26 10:48:32 2016
@@ -65,8 +65,7 @@ public class AggregateMailetdocsReport e
             logNoSubprojects(project);
             extractor.extract(project, getLog());
         }
-        final List<MailetMatcherDescriptor> descriptors = extractor.descriptors();
-        return descriptors;
+        return extractor.descriptors();
     }
 
     private void logProject(MavenProject project) {

Modified: james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/DefaultDescriptorsExtractor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/DefaultDescriptorsExtractor.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/DefaultDescriptorsExtractor.java (original)
+++ james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/DefaultDescriptorsExtractor.java Tue Jan 26 10:48:32 2016
@@ -255,8 +255,7 @@ public class DefaultDescriptorsExtractor
         for (String s : (Iterable<String>) project.getCompileSourceRoots()) {
             builder.addSourceTree(new File(s));
         }
-        final JavaClass[] classes = builder.getClasses();
-        return classes;
+        return builder.getClasses();
     }
 
 

Modified: james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/MailetdocsReport.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/MailetdocsReport.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/MailetdocsReport.java (original)
+++ james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/MailetdocsReport.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ public class MailetdocsReport extends Ab
      */
     protected List<MailetMatcherDescriptor> buildDescriptors(final MavenProject project) {
         logProject(project);
-        final List<MailetMatcherDescriptor> descriptors = new DefaultDescriptorsExtractor().extract(project, getLog()).descriptors();
-        return descriptors;
+        return new DefaultDescriptorsExtractor().extract(project, getLog()).descriptors();
     }
 
     private void logProject(final MavenProject project) {

Modified: james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/Runner.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/Runner.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/Runner.java (original)
+++ james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/Runner.java Tue Jan 26 10:48:32 2016
@@ -125,14 +125,12 @@ public class Runner {
     public String toString()
     {
         final String TAB = " ";
-        
-        String result  = "Runner ( "
+
+        return "Runner ( "
             + "preElements = " + this.preElements + TAB
             + "testElements = " + this.testElements + TAB
             + "postElements = " + this.postElements + TAB
             + " )";
-    
-        return result;
     }
 
     

Modified: james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java (original)
+++ james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java Tue Jan 26 10:48:32 2016
@@ -354,8 +354,7 @@ public class ProtocolSession implements
          * @return <code>true</code> if the actual matches the expected.
          */
         protected boolean match(String expected, String actual) {
-            final boolean result = Pattern.matches(expected, actual);
-            return result;
+            return Pattern.matches(expected, actual);
         }
 
         /**

Modified: james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java (original)
+++ james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java Tue Jan 26 10:48:32 2016
@@ -179,11 +179,9 @@ public final class ExternalSession imple
     public String toString() {
         final String TAB = " ";
 
-        String result = "External ( " + "socket = " + this.socket + TAB + "monitor = " + this.monitor + TAB
+        return "External ( " + "socket = " + this.socket + TAB + "monitor = " + this.monitor + TAB
                 + "readBuffer = " + this.readBuffer + TAB + "ascii = " + this.ascii + TAB + "lineEndBuffer = "
                 + this.lineEndBuffer + TAB + "first = " + this.first + TAB + "shabang = " + this.shabang + TAB + " )";
-
-        return result;
     }
 
 }

Modified: james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSessionFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSessionFactory.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSessionFactory.java (original)
+++ james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSessionFactory.java Tue Jan 26 10:48:32 2016
@@ -57,8 +57,7 @@ public class ExternalSessionFactory impl
         monitor.note("Connecting to " + address.getHostName() + ":" + address.getPort());
         final SocketChannel channel = SocketChannel.open(address);
         channel.configureBlocking(false);
-        final ExternalSession result = new ExternalSession(channel, monitor, shabang);
-        return result;
+        return new ExternalSession(channel, monitor, shabang);
     }
 
     protected InetSocketAddress getAddress() {
@@ -75,12 +74,10 @@ public class ExternalSessionFactory impl
     public String toString() {
         final String TAB = " ";
 
-        String retValue = "ExternalSessionFactory ( "
+        return "ExternalSessionFactory ( "
             + "address = " + this.getAddress() + TAB
             + "monitor = " + this.monitor + TAB
             + "shabang = " + this.shabang + TAB
             + " )";
-
-        return retValue;
     }
 }
\ No newline at end of file

Modified: james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/user/ScriptedUserAdder.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/user/ScriptedUserAdder.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/user/ScriptedUserAdder.java (original)
+++ james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/user/ScriptedUserAdder.java Tue Jan 26 10:48:32 2016
@@ -117,16 +117,14 @@ public class ScriptedUserAdder implement
     public String toString()
     {
         final String TAB = " ";
-        
-        String result = "ScriptedUserAdder ( "
+
+        return "ScriptedUserAdder ( "
             + super.toString() + TAB
             + "host = " + this.host + TAB
             + "port = " + this.port + TAB
             + "script = " + this.script + TAB
             + "monitor = " + this.monitor + TAB
             + " )";
-    
-        return result;
     }
     
     

Modified: james/project/trunk/mpt/core/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java (original)
+++ james/project/trunk/mpt/core/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java Tue Jan 26 10:48:32 2016
@@ -87,13 +87,11 @@ public class TestExternalHostSystem exte
 
     private Session newSession(final String shabang) throws Exception {
         ExternalSessionFactory system = buildSystem(shabang);
-        Session session = system.newSession(continuation);
-        return session;
+        return system.newSession(continuation);
     }
 
     private ExternalHostSystem buildSystem(final String shabang) {
-        ExternalHostSystem system = new ExternalHostSystem(SUPPORTED_FEATURES, "localhost", PORT ,
+        return new ExternalHostSystem(SUPPORTED_FEATURES, "localhost", PORT ,
                 new NullMonitor(), shabang, userAdder);
-        return system;
     }
 }

Modified: james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java (original)
+++ james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java Tue Jan 26 10:48:32 2016
@@ -97,8 +97,7 @@ public abstract class JamesImapHostSyste
                 handler.handleRequest(in, out, session);
                 isReadLast = true;
             }
-            final String result = out.nextLine();
-            return result;
+            return out.nextLine();
         }
 
         public void start() throws Exception {

Modified: james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java (original)
+++ james/project/trunk/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java Tue Jan 26 10:48:32 2016
@@ -78,8 +78,7 @@ public class ImapSessionImpl implements
     }
 
     public Object getAttribute(String key) {
-        final Object result = attributesByKey.get(key);
-        return result;
+        return attributesByKey.get(key);
     }
 
     public void setAttribute(String key, Object value) {

Modified: james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java (original)
+++ james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java Tue Jan 26 10:48:32 2016
@@ -64,8 +64,7 @@ public class JPAHostSystem extends James
     private static final ImapFeatures SUPPORTED_FEATURES = ImapFeatures.of(Feature.NAMESPACE_SUPPORT);
 
     public static JamesImapHostSystem build() throws Exception {
-        JPAHostSystem host =  new JPAHostSystem();
-        return host;
+        return new JPAHostSystem();
     }
     
     private final OpenJPAMailboxManager mailboxManager;

Modified: james/project/trunk/protocols/api/src/main/java/org/apache/james/protocols/api/handler/CommandDispatcher.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/api/src/main/java/org/apache/james/protocols/api/handler/CommandDispatcher.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/api/src/main/java/org/apache/james/protocols/api/handler/CommandDispatcher.java (original)
+++ james/project/trunk/protocols/api/src/main/java/org/apache/james/protocols/api/handler/CommandDispatcher.java Tue Jan 26 10:48:32 2016
@@ -29,8 +29,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.Configuration;
+import org.apache.commons.configuration.ConfigurationException;
 import org.apache.james.protocols.api.BaseRequest;
 import org.apache.james.protocols.api.ProtocolSession;
 import org.apache.james.protocols.api.Request;
@@ -62,17 +62,17 @@ public class CommandDispatcher<Session e
     public CommandDispatcher() {
         this(Collections.<String>emptyList());
     }
-
-    @Override
-    public void init(Configuration config) throws ConfigurationException {
-
-    }
-
-    @Override
-    public void destroy() {
-
-    }
-
+
+    @Override
+    public void init(Configuration config) throws ConfigurationException {
+
+    }
+
+    @Override
+    public void destroy() {
+
+    }
+
     /**
      * Add it to map (key as command name, value is an array list of CommandHandlers)
      *
@@ -260,8 +260,7 @@ public class CommandDispatcher<Session e
         }
         curCommandName = curCommandName.toUpperCase(Locale.US);
 
-        BaseRequest request = new BaseRequest(curCommandName, curCommandArgument);
-        return request;
+        return new BaseRequest(curCommandName, curCommandArgument);
 
     }
    

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/ImapSessionUtils.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/ImapSessionUtils.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/ImapSessionUtils.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/ImapSessionUtils.java Tue Jan 26 10:48:32 2016
@@ -29,8 +29,7 @@ public class ImapSessionUtils {
     public static final String MAILBOX_SESSION_ATTRIBUTE_SESSION_KEY = "org.apache.james.api.imap.MAILBOX_SESSION_ATTRIBUTE_SESSION_KEY";
 
     public static MailboxSession getMailboxSession(final ImapSession session) {
-        final MailboxSession result = (MailboxSession) session.getAttribute(ImapSessionUtils.MAILBOX_SESSION_ATTRIBUTE_SESSION_KEY);
-        return result;
+        return (MailboxSession) session.getAttribute(ImapSessionUtils.MAILBOX_SESSION_ATTRIBUTE_SESSION_KEY);
     }
 
     public static String getUserName(final ImapSession imapSession) {

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/IdRange.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/IdRange.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/IdRange.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/IdRange.java Tue Jan 26 10:48:32 2016
@@ -111,9 +111,7 @@ public final class IdRange implements It
      * @return a <code>String</code> representation of this object.
      */
     public String toString() {
-        final String retValue = "IdRange ( " + this._lowVal + "->" + this._highVal + " )";
-
-        return retValue;
+        return "IdRange ( " + this._lowVal + "->" + this._highVal + " )";
     }
 
     public String getFormattedString() {

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/response/StatusResponse.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/response/StatusResponse.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/response/StatusResponse.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/api/message/response/StatusResponse.java Tue Jan 26 10:48:32 2016
@@ -310,8 +310,7 @@ public interface StatusResponse extends
                 buffer.append('X');
             }
             buffer.append(name);
-            final ResponseCode result = new ResponseCode(buffer.toString());
-            return result;
+            return new ResponseCode(buffer.toString());
         }
 
         public final static int NO_NUMBER = -1;

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/ImapRequestLineReader.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/ImapRequestLineReader.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/ImapRequestLineReader.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/ImapRequestLineReader.java Tue Jan 26 10:48:32 2016
@@ -64,8 +64,7 @@ public abstract class ImapRequestLineRea
 
 
     public static int cap(char next) {
-        final int cap = next > 'Z' ? next ^ 32 : next;
-        return cap;
+        return next > 'Z' ? next ^ 32 : next;
     }
     
     /**
@@ -306,8 +305,7 @@ public abstract class ImapRequestLineRea
         final char decadeChar = consume();
         final char yearChar = consume();
         final int year = DecoderUtils.decodeYear(milleniumChar, centuryChar, decadeChar, yearChar);
-        final DayMonthYear result = new DayMonthYear(day, month, year);
-        return result;
+        return new DayMonthYear(day, month, year);
     }
 
     private void nextIsDash() throws DecodingException {
@@ -445,8 +443,7 @@ public abstract class ImapRequestLineRea
 
     private String decode(final Charset charset, final ByteBuffer buffer) throws DecodingException {
         try {
-            final String result = charset.newDecoder().onMalformedInput(CodingErrorAction.REPORT).onUnmappableCharacter(CodingErrorAction.REPORT).decode(buffer).toString();
-            return result;
+            return charset.newDecoder().onMalformedInput(CodingErrorAction.REPORT).onUnmappableCharacter(CodingErrorAction.REPORT).decode(buffer).toString();
 
         } catch (IllegalStateException e) {
             throw new DecodingException(HumanReadableText.BAD_IO_ENCODING, "Bad character encoding", e);
@@ -836,8 +833,7 @@ public abstract class ImapRequestLineRea
                     next = request.nextChar();
                 }
                 completeDecoding();
-                final String result = charBuffer.toString();
-                return result;
+                return charBuffer.toString();
 
             } catch (IllegalStateException e) {
                 throw new DecodingException(HumanReadableText.BAD_IO_ENCODING, "Bad character encoding", e);

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java Tue Jan 26 10:48:32 2016
@@ -145,8 +145,7 @@ public abstract class AbstractSelectionC
         }
 
         request.eol();
-        final ImapMessage result = createRequest(command, mailboxName, condstore, lastKnownUidValidity, knownModSeq, uidSet, knownUidSet, knownSequenceSet, tag);
-        return result;
+        return createRequest(command, mailboxName, condstore, lastKnownUidValidity, knownModSeq, uidSet, knownUidSet, knownSequenceSet, tag);
     }
     
     /**

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java Tue Jan 26 10:48:32 2016
@@ -33,14 +33,12 @@ abstract class AbstractUidCommandParser
     }
 
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
-        final ImapMessage result = decode(command, request, tag, false, session);
-        return result;
+        return decode(command, request, tag, false, session);
     }
 
     public ImapMessage decode(ImapRequestLineReader request, String tag, boolean useUids, ImapSession session) throws DecodingException {
         final ImapCommand command = getCommand();
-        final ImapMessage result = decode(command, request, tag, useUids, session);
-        return result;
+        return decode(command, request, tag, useUids, session);
     }
 
     protected abstract ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, boolean useUids, ImapSession session) throws DecodingException;

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java Tue Jan 26 10:48:32 2016
@@ -85,7 +85,6 @@ public class AppendCommandParser extends
         }
         request.nextWordChar();
 
-        final ImapMessage result = new AppendRequest(command, mailboxName, flags, datetime, request.consumeLiteral(true), tag);
-        return result;
+        return new AppendRequest(command, mailboxName, flags, datetime, request.consumeLiteral(true), tag);
     }
 }




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