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 [2/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
Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ public class CapabilityCommandParser ext
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new CapabilityRequest(command, tag);
-        return result;
+        return new CapabilityRequest(command, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ public class CheckCommandParser extends
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new CheckRequest(command, tag);
-        return result;
+        return new CheckRequest(command, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ class CloseCommandParser extends Abstrac
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new CloseRequest(command, tag);
-        return result;
+        return new CloseRequest(command, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java Tue Jan 26 10:48:32 2016
@@ -49,8 +49,7 @@ public class CopyCommandParser extends A
         IdRange[] idSet = request.parseIdRange(session);
         String mailboxName = request.mailbox();
         request.eol();
-        final ImapMessage result = createRequest(command, tag, useUids, idSet, mailboxName);
-        return result;
+        return createRequest(command, tag, useUids, idSet, mailboxName);
     }
 
 	protected CopyRequest createRequest(ImapCommand command, String tag,

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

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java Tue Jan 26 10:48:32 2016
@@ -46,8 +46,7 @@ public class DeleteCommandParser extends
         String mailboxName = request.mailbox();
         request.eol();
 
-        final ImapMessage result = new DeleteRequest(command, mailboxName, tag);
-        return result;
+        return new DeleteRequest(command, mailboxName, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java Tue Jan 26 10:48:32 2016
@@ -49,8 +49,7 @@ public class ExpungeCommandParser extend
         }
         request.eol();
 
-        final ImapMessage result = new ExpungeRequest(command, tag, uidSet);
-        return result;
+        return new ExpungeRequest(command, tag, uidSet);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java Tue Jan 26 10:48:32 2016
@@ -215,8 +215,7 @@ public class FetchCommandParser extends
 
         final List<String> names = decoder.getNames();
         final int[] path = decoder.getPath();
-        final BodyFetchElement bodyFetchElement = new BodyFetchElement(responseName, sectionType, path, names, firstOctet, numberOfOctets);
-        return bodyFetchElement;
+        return new BodyFetchElement(responseName, sectionType, path, names, firstOctet, numberOfOctets);
     }
 
     private int getSectionType(FetchPartPathDecoder decoder) throws DecodingException {
@@ -286,8 +285,7 @@ public class FetchCommandParser extends
         
         request.eol();
 
-        final ImapMessage result = new FetchRequest(command, useUids, idSet, fetch, tag);
-        return result;
+        return new FetchRequest(command, useUids, idSet, fetch, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/IdleCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/IdleCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/IdleCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/IdleCommandParser.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ public class IdleCommandParser extends A
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new IdleRequest(command, tag);
-        return result;
+        return new IdleRequest(command, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java Tue Jan 26 10:48:32 2016
@@ -78,12 +78,10 @@ public class ListCommandParser extends A
         String referenceName = request.mailbox();
         String mailboxPattern = listMailbox(request);
         request.eol();
-        final ImapMessage result = createMessage(command, referenceName, mailboxPattern, tag);
-        return result;
+        return createMessage(command, referenceName, mailboxPattern, tag);
     }
 
     protected ImapMessage createMessage(ImapCommand command, final String referenceName, final String mailboxPattern, final String tag) {
-        final ImapMessage result = new ListRequest(command, referenceName, mailboxPattern, tag);
-        return result;
+        return new ListRequest(command, referenceName, mailboxPattern, tag);
     }
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java Tue Jan 26 10:48:32 2016
@@ -47,8 +47,7 @@ public class LoginCommandParser extends
         final String password = request.astring();
         request.eol();
 
-        final ImapMessage result = new LoginRequest(command, userid, password, tag);
-        return result;
+        return new LoginRequest(command, userid, password, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ public class LogoutCommandParser extends
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new LogoutRequest(command, tag);
-        return result;
+        return new LogoutRequest(command, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LsubCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LsubCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LsubCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/LsubCommandParser.java Tue Jan 26 10:48:32 2016
@@ -38,7 +38,6 @@ public class LsubCommandParser extends L
      * java.lang.String, java.lang.String, java.lang.String)
      */
     protected ImapMessage createMessage(ImapCommand command, String referenceName, String mailboxPattern, String tag) {
-        final ImapMessage result = new LsubRequest(command, referenceName, mailboxPattern, tag);
-        return result;
+        return new LsubRequest(command, referenceName, mailboxPattern, tag);
     }
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java Tue Jan 26 10:48:32 2016
@@ -44,8 +44,7 @@ public class NoopCommandParser extends A
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new NoopRequest(command, tag);
-        return result;
+        return new NoopRequest(command, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java Tue Jan 26 10:48:32 2016
@@ -46,8 +46,7 @@ public class RenameCommandParser extends
         final String existingName = request.mailbox();
         final String newName = request.mailbox();
         request.eol();
-        final ImapMessage result = new RenameRequest(command, existingName, newName, tag);
-        return result;
+        return new RenameRequest(command, existingName, newName, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java Tue Jan 26 10:48:32 2016
@@ -728,8 +728,7 @@ public class SearchCommandParser extends
 
     private SearchKey sequenceSet(ImapSession session, ImapRequestLineReader request) throws DecodingException {
         final IdRange[] range = request.parseIdRange(session);
-        final SearchKey result = SearchKey.buildSequenceSet(range);
-        return result;
+        return SearchKey.buildSequenceSet(range);
     }
 
     private SearchKey to(ImapRequestLineReader request, final Charset charset) throws DecodingException {
@@ -908,8 +907,7 @@ public class SearchCommandParser extends
     private ImapMessage unsupportedCharset(final String tag, final ImapCommand command) {
         final StatusResponseFactory factory = getStatusResponseFactory();
         final ResponseCode badCharset = StatusResponse.ResponseCode.badCharset(CharsetUtil.getAvailableCharsetNames());
-        final StatusResponse result = factory.taggedNo(tag, command, HumanReadableText.BAD_CHARSET, badCharset);
-        return result;
+        return factory.taggedNo(tag, command, HumanReadableText.BAD_CHARSET, badCharset);
     }
 
     /**
@@ -1026,9 +1024,8 @@ public class SearchCommandParser extends
             if (options == null) {
                 options = new ArrayList<SearchResultOption>();
             }
-            
-            final ImapMessage result = new SearchRequest(command, new SearchOperation(finalKey, options), useUids, tag);
-            return result;
+
+            return new SearchRequest(command, new SearchOperation(finalKey, options), useUids, tag);
         } catch (IllegalCharsetNameException e) {
             session.getLog().debug("Unable to decode request", e);
             return unsupportedCharset(tag, command);

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java Tue Jan 26 10:48:32 2016
@@ -112,7 +112,6 @@ public class StoreCommandParser extends
         }
 
         request.eol();
-        final ImapMessage result = new StoreRequest(command, idSet, silent, flags, useUids, tag, sign, unchangedSince);
-        return result;
+        return new StoreRequest(command, idSet, silent, flags, useUids, tag, sign, unchangedSince);
     }
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java Tue Jan 26 10:48:32 2016
@@ -46,8 +46,7 @@ public class SubscribeCommandParser exte
         final String mailboxName = request.mailbox();
         request.eol();
 
-        final ImapMessage result = new SubscribeRequest(command, mailboxName, tag);
-        return result;
+        return new SubscribeRequest(command, mailboxName, tag);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java Tue Jan 26 10:48:32 2016
@@ -74,8 +74,7 @@ public class UidCommandParser extends Ab
             throw new DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "Invalid UID command: '" + commandName + "'");
         }
         final AbstractUidCommandParser uidEnabled = (AbstractUidCommandParser) helperCommand;
-        final ImapMessage result = uidEnabled.decode(request, tag, true, session);
-        return result;
+        return uidEnabled.decode(request, tag, true, session);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UnselectCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UnselectCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UnselectCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/UnselectCommandParser.java Tue Jan 26 10:48:32 2016
@@ -50,8 +50,7 @@ public class UnselectCommandParser exten
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();
-        final ImapMessage result = new UnselectRequest(tag, command);
-        return result;
+        return new UnselectRequest(tag, command);
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/XListCommandParser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/XListCommandParser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/XListCommandParser.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/XListCommandParser.java Tue Jan 26 10:48:32 2016
@@ -34,7 +34,6 @@ public class XListCommandParser extends
 
     @Override
     protected ImapMessage createMessage(ImapCommand command, final String referenceName, final String mailboxPattern, final String tag) {
-        final ImapMessage result = new XListRequest(command, referenceName, mailboxPattern, tag);
-        return result;
+        return new XListRequest(command, referenceName, mailboxPattern, tag);
     }
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/encode/EncoderUtils.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/encode/EncoderUtils.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/encode/EncoderUtils.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/encode/EncoderUtils.java Tue Jan 26 10:48:32 2016
@@ -39,7 +39,6 @@ public class EncoderUtils {
      */
     public static String encodeDateTime(final Date date) {
         final FastDateFormat format = FastDateFormat.getInstance("dd-MMM-yyyy HH:mm:ss Z", TimeZone.getTimeZone("GMT"), Locale.US);
-        final String result = format.format(date);
-        return result;
+        return format.format(date);
     }
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/main/DefaultImapDecoderFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/main/DefaultImapDecoderFactory.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/main/DefaultImapDecoderFactory.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/main/DefaultImapDecoderFactory.java Tue Jan 26 10:48:32 2016
@@ -35,8 +35,7 @@ public class DefaultImapDecoderFactory i
     public static final ImapDecoder createDecoder() {
         final UnpooledStatusResponseFactory unpooledStatusResponseFactory = new UnpooledStatusResponseFactory();
         final ImapCommandParserFactory imapCommands = new ImapParserFactory(unpooledStatusResponseFactory);
-        final ImapDecoder result = new DefaultImapDecoder(unpooledStatusResponseFactory, imapCommands);
-        return result;
+        return new DefaultImapDecoder(unpooledStatusResponseFactory, imapCommands);
     }
 
     public ImapDecoder buildImapDecoder() {

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/AbstractListingResponse.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/AbstractListingResponse.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/AbstractListingResponse.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/AbstractListingResponse.java Tue Jan 26 10:48:32 2016
@@ -205,10 +205,8 @@ public abstract class AbstractListingRes
     public String toString() {
         final String TAB = " ";
 
-        String retValue = getClass().getName() + " ( " + "noInferiors = " + this.noInferiors + TAB + "noSelect = " + this.noSelect + TAB + "marked = " + this.marked + TAB + "unmarked = " + this.unmarked + TAB + "hierarchyDelimiter = " + this.hierarchyDelimiter + TAB + "name = " + this.name + TAB
+        return getClass().getName() + " ( " + "noInferiors = " + this.noInferiors + TAB + "noSelect = " + this.noSelect + TAB + "marked = " + this.marked + TAB + "unmarked = " + this.unmarked + TAB + "hierarchyDelimiter = " + this.hierarchyDelimiter + TAB + "name = " + this.name + TAB
                 + "type = " + this.type + TAB + " )";
-
-        return retValue;
     }
 
 }
\ No newline at end of file

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/CapabilityResponse.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/CapabilityResponse.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/CapabilityResponse.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/message/response/CapabilityResponse.java Tue Jan 26 10:48:32 2016
@@ -82,9 +82,7 @@ public class CapabilityResponse implemen
      * @return a description suitable for debugging
      */
     public String toString() {
-        final String retValue = "CapabilityResponse ( " + "capabilities = " + this.capabilities + " )";
-
-        return retValue;
+        return "CapabilityResponse ( " + "capabilities = " + this.capabilities + " )";
     }
 
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java Tue Jan 26 10:48:32 2016
@@ -75,8 +75,7 @@ abstract public class AbstractMailboxPro
     }
 
     protected final void doProcess(final M acceptableMessage, final Responder responder, final ImapSession session) {
-        final M request = acceptableMessage;
-        process(request, responder, session);
+        process(acceptableMessage, responder, session);
     }
 
     protected final void process(final M message, final Responder responder, final ImapSession session) {
@@ -290,8 +289,7 @@ abstract public class AbstractMailboxPro
     
     private MessageManager getMailbox(final ImapSession session, final SelectedMailbox selected) throws MailboxException {
         final MailboxManager mailboxManager = getMailboxManager();
-        final MessageManager mailbox = mailboxManager.getMailbox(selected.getPath(), ImapSessionUtils.getMailboxSession(session));
-        return mailbox;
+        return mailboxManager.getMailbox(selected.getPath(), ImapSessionUtils.getMailboxSession(session));
     }
 
     private void addRecentResponses(final SelectedMailbox selected, final ImapProcessor.Responder responder) {
@@ -503,8 +501,7 @@ abstract public class AbstractMailboxPro
                 return MessageRange.one(selected.getLastUid());
             } 
         }
-        MessageRange mRange = MessageRange.range(lowVal, highVal);
-        return mRange;
+        return MessageRange.range(lowVal, highVal);
     }
 
     /**

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/CopyProcessor.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/CopyProcessor.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/CopyProcessor.java Tue Jan 26 10:48:32 2016
@@ -120,7 +120,6 @@ public class CopyProcessor extends Abstr
 			final MailboxSession mailboxSession,
 			final MailboxManager mailboxManager, MessageRange messageSet)
 			throws MailboxException {
-		List<MessageRange> processedUids = mailboxManager.copyMessages(messageSet, currentMailbox.getPath(), targetMailbox, mailboxSession);
-		return processedUids;
+        return mailboxManager.copyMessages(messageSet, currentMailbox.getPath(), targetMailbox, mailboxSession);
 }
 }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/MoveProcessor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/MoveProcessor.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/MoveProcessor.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/MoveProcessor.java Tue Jan 26 10:48:32 2016
@@ -30,8 +30,7 @@ public class MoveProcessor extends CopyP
 			final MailboxSession mailboxSession,
 			final MailboxManager mailboxManager, MessageRange messageSet)
 			throws MailboxException {
-		List<MessageRange> processedUids = mailboxManager.moveMessages(messageSet, currentMailbox.getPath(), targetMailbox, mailboxSession);
-		return processedUids;
+		return mailboxManager.moveMessages(messageSet, currentMailbox.getPath(), targetMailbox, mailboxSession);
 	}
 
     /**

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java Tue Jan 26 10:48:32 2016
@@ -456,8 +456,7 @@ public class SearchProcessor extends Abs
             }
         }
 
-        Criterion crit = SearchQuery.uid(ranges.toArray(new SearchQuery.NumericRange[0]));
-        return crit;
+        return SearchQuery.uid(ranges.toArray(new SearchQuery.NumericRange[0]));
     }
 
     private Criterion or(List<SearchKey> keys, final ImapSession session) throws MessageRangeException {
@@ -465,15 +464,13 @@ public class SearchProcessor extends Abs
         final SearchKey keyTwo = keys.get(1);
         final Criterion criterionOne = toCriterion(keyOne, session);
         final Criterion criterionTwo = toCriterion(keyTwo, session);
-        final Criterion result = SearchQuery.or(criterionOne, criterionTwo);
-        return result;
+        return SearchQuery.or(criterionOne, criterionTwo);
     }
 
     private Criterion not(List<SearchKey> keys, final ImapSession session) throws MessageRangeException {
         final SearchKey key = keys.get(0);
         final Criterion criterion = toCriterion(key, session);
-        final Criterion result = SearchQuery.not(criterion);
-        return result;
+        return SearchQuery.not(criterion);
     }
 
     private Criterion and(List<SearchKey> keys, final ImapSession session) throws MessageRangeException {
@@ -483,8 +480,7 @@ public class SearchProcessor extends Abs
             final Criterion criterion = toCriterion(key, session);
             criteria.add(criterion);
         }
-        final Criterion result = SearchQuery.and(criteria);
-        return result;
+        return SearchQuery.and(criteria);
     }
 
     /**

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java Tue Jan 26 10:48:32 2016
@@ -107,8 +107,7 @@ public class StatusProcessor extends Abs
     private Long uidValidity(final StatusDataItems statusDataItems, final MessageManager.MetaData metaData) throws MailboxException {
         final Long uidValidity;
         if (statusDataItems.isUidValidity()) {
-            final long uidValidityValue = metaData.getUidValidity();
-            uidValidity = uidValidityValue;
+            uidValidity = metaData.getUidValidity();
         } else {
             uidValidity = null;
         }
@@ -130,8 +129,7 @@ public class StatusProcessor extends Abs
     private Long uidNext(final StatusDataItems statusDataItems, final MessageManager.MetaData metaData) throws MailboxException {
         final Long uidNext;
         if (statusDataItems.isUidNext()) {
-            final long uidNextValue = metaData.getUidNext();
-            uidNext = uidNextValue;
+            uidNext = metaData.getUidNext();
         } else {
             uidNext = null;
         }

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java Tue Jan 26 10:48:32 2016
@@ -61,8 +61,7 @@ public final class EnvelopeBuilder {
         final FetchResponse.Envelope.Address[] bccAddresses = buildAddresses(headers, ImapConstants.RFC822_BCC);
         final String inReplyTo = headerValue(headers, ImapConstants.RFC822_IN_REPLY_TO);
         final String messageId = headerValue(headers, ImapConstants.RFC822_MESSAGE_ID);
-        final FetchResponse.Envelope envelope = new EnvelopeImpl(date, subject, fromAddresses, senderAddresses, replyToAddresses, toAddresses, ccAddresses, bccAddresses, inReplyTo, messageId);
-        return envelope;
+        return new EnvelopeImpl(date, subject, fromAddresses, senderAddresses, replyToAddresses, toAddresses, ccAddresses, bccAddresses, inReplyTo, messageId);
     }
 
     private String headerValue(final Headers message, final String headerName) throws MailboxException {
@@ -175,8 +174,7 @@ public final class EnvelopeBuilder {
             atDomainList = route.toRouteString();
         }
         final String localPart = mailbox.getLocalPart();
-        final FetchResponse.Envelope.Address result = buildMailboxAddress(name, atDomainList, localPart, domain);
-        return result;
+        return buildMailboxAddress(name, atDomainList, localPart, domain);
     }
 
     private void addAddresses(final Group group, final List<FetchResponse.Envelope.Address> addresses) {
@@ -194,17 +192,14 @@ public final class EnvelopeBuilder {
     }
 
     private FetchResponse.Envelope.Address startGroup(String groupName) {
-        final FetchResponse.Envelope.Address result = new AddressImpl(null, null, groupName, null);
-        return result;
+        return new AddressImpl(null, null, groupName, null);
     }
 
     private FetchResponse.Envelope.Address endGroup() {
-        final FetchResponse.Envelope.Address result = new AddressImpl(null, null, null, null);
-        return result;
+        return new AddressImpl(null, null, null, null);
     }
 
     private FetchResponse.Envelope.Address buildMailboxAddress(String name, String atDomainList, String mailbox, String domain) {
-        final FetchResponse.Envelope.Address result = new AddressImpl(atDomainList, domain, mailbox, name);
-        return result;
+        return new AddressImpl(atDomainList, domain, mailbox, name);
     }
 }
\ No newline at end of file

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchResponseBuilder.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchResponseBuilder.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchResponseBuilder.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchResponseBuilder.java Tue Jan 26 10:48:32 2016
@@ -100,8 +100,7 @@ public final class FetchResponseBuilder
     }
 
     public FetchResponse build() {
-        final FetchResponse result = new FetchResponse(msn, flags, uid, modSeq, internalDate, size, envelope, body, bodystructure, elements);
-        return result;
+        return new FetchResponse(msn, flags, uid, modSeq, internalDate, size, envelope, body, bodystructure, elements);
     }
 
     public FetchResponse build(FetchData fetch, MessageResult result, MessageManager mailbox, ImapSession session, boolean useUids) throws MessageRangeException, MailboxException {
@@ -220,8 +219,7 @@ public final class FetchResponseBuilder
         final Collection<String> names = fetchElement.getFieldNames();
         final boolean isBase = (path == null || path.length == 0);
         final FetchResponse.BodyElement fullResult = bodyContent(messageResult, name, specifier, path, names, isBase);
-        final FetchResponse.BodyElement result = wrapIfPartialFetch(firstOctet, numberOfOctets, fullResult);
-        return result;
+        return wrapIfPartialFetch(firstOctet, numberOfOctets, fullResult);
 
     }
 
@@ -383,8 +381,7 @@ public final class FetchResponseBuilder
 
     private Iterator<MessageResult.Header> getMimeHeaders(final MessageResult messageResult, final int[] path, final boolean isBase) throws MailboxException {
         MessageResult.MimePath mimePath = new MimePathImpl(path);
-        final Iterator<MessageResult.Header> headers = messageResult.iterateMimeHeaders(mimePath);
-        return headers;
+        return messageResult.iterateMimeHeaders(mimePath);
     }
 
     private FetchResponse.BodyElement content(final MessageResult messageResult, String name, final int[] path, final boolean isBase) throws MailboxException {

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MessageResultUtils.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MessageResultUtils.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MessageResultUtils.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MessageResultUtils.java Tue Jan 26 10:48:32 2016
@@ -97,8 +97,7 @@ public class MessageResultUtils {
      * @throws MessagingException
      */
     public static List<MessageResult.Header> getMatching(final Collection<String> names, final Iterator<MessageResult.Header> iterator) throws MailboxException {
-        final List<MessageResult.Header> result = matching(names, iterator, false);
-        return result;
+        return matching(names, iterator, false);
     }
 
     private static List<MessageResult.Header> matching(final Collection<String> names, final Iterator<MessageResult.Header> iterator, boolean not) throws MailboxException {
@@ -144,8 +143,7 @@ public class MessageResultUtils {
      * @throws MessagingException
      */
     public static List<MessageResult.Header> getNotMatching(final Collection<String> names, final Iterator<MessageResult.Header> iterator) throws MailboxException {
-        final List<MessageResult.Header> result = matching(names, iterator, true);
-        return result;
+        return matching(names, iterator, true);
     }
 
     /**

Modified: james/project/trunk/protocols/imap/src/main/java/org/apache/james/protocols/imap/utils/DecoderUtils.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/main/java/org/apache/james/protocols/imap/utils/DecoderUtils.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/main/java/org/apache/james/protocols/imap/utils/DecoderUtils.java (original)
+++ james/project/trunk/protocols/imap/src/main/java/org/apache/james/protocols/imap/utils/DecoderUtils.java Tue Jan 26 10:48:32 2016
@@ -139,8 +139,7 @@ public final class DecoderUtils {
             final GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"), Locale.US);
             calendar.clear();
             calendar.set(year, month, day, hour, minute, second);
-            final Date result = calendar.getTime();
-            return result;
+            return calendar.getTime();
         } else {
             final String message;
             if (chars == null) {
@@ -168,13 +167,11 @@ public final class DecoderUtils {
     }
 
     private static int applyMinuteOffset(final int offset, final int minutes) {
-        final int result = minutes - ((Math.abs(offset) % 100) * (offset == 0 ? 0 : offset > 0 ? 1 : -1));
-        return result;
+        return minutes - ((Math.abs(offset) % 100) * (offset == 0 ? 0 : offset > 0 ? 1 : -1));
     }
 
     private static int applyHourOffset(final int offset, final int hours) {
-        final int result = hours - (offset / 100);
-        return result;
+        return hours - (offset / 100);
     }
 
     public static int decodeNumber(final char high, final char low) throws DecodingException {
@@ -193,8 +190,7 @@ public final class DecoderUtils {
         } else {
             throw createTimeZoneException(zoneDeterminent, zoneDigitOne, zoneDigitTwo, zoneDigitThree, zoneDigitFour);
         }
-        final int result = sign * ((1000 * decodeDigit(zoneDigitOne)) + (100 * decodeDigit(zoneDigitTwo)) + (10 * decodeDigit(zoneDigitThree)) + decodeDigit(zoneDigitFour));
-        return result;
+        return sign * ((1000 * decodeDigit(zoneDigitOne)) + (100 * decodeDigit(zoneDigitTwo)) + (10 * decodeDigit(zoneDigitThree)) + decodeDigit(zoneDigitFour));
     }
 
     private static DecodingException createTimeZoneException(char zoneDeterminent, char zoneDigitOne, char zoneDigitTwo, char zoneDigitThree, char zoneDigitFour) {
@@ -219,8 +215,7 @@ public final class DecoderUtils {
      * @return true if ASCII 0-9, false otherwise
      */
     public static boolean isSimpleDigit(char character) {
-        final boolean result = !(character < '0' || character > '9');
-        return result;
+        return !(character < '0' || character > '9');
     }
 
     /**

Modified: james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java (original)
+++ james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserAndParenthesesTest.java Tue Jan 26 10:48:32 2016
@@ -67,8 +67,7 @@ public class SearchCommandParserAndParen
         if (parens) {
             buffer.append(")");
         }
-        Input input = new Input(buffer.toString(), SearchKey.buildAnd(keys));
-        return input;
+        return new Input(buffer.toString(), SearchKey.buildAnd(keys));
     }
 
     public static Input sequence() {

Modified: james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FakeImapSession.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FakeImapSession.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FakeImapSession.java (original)
+++ james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FakeImapSession.java Tue Jan 26 10:48:32 2016
@@ -78,8 +78,7 @@ public class FakeImapSession 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/protocols/imap/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderEnvelopeTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderEnvelopeTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderEnvelopeTest.java (original)
+++ james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/encode/FetchResponseEncoderEnvelopeTest.java Tue Jan 26 10:48:32 2016
@@ -110,18 +110,16 @@ public class FetchResponseEncoderEnvelop
     }
 
     private Address[] mockOneAddress() {
-        Address[] one = { mockAddress(ADDRESS_ONE_NAME,
+        return new Address[]{ mockAddress(ADDRESS_ONE_NAME,
                 ADDRESS_ONE_DOMAIN_LIST, ADDRESS_ONE_MAILBOX, ADDRESS_ONE_HOST) };
-        return one;
     }
 
     private Address[] mockManyAddresses() {
-        Address[] many = {
+        return new Address[]{
                 mockAddress(ADDRESS_ONE_NAME, ADDRESS_ONE_DOMAIN_LIST,
                         ADDRESS_ONE_MAILBOX, ADDRESS_ONE_HOST),
                 mockAddress(ADDRESS_TWO_NAME, ADDRESS_TWO_DOMAIN_LIST,
                         ADDRESS_TWO_MAILBOX, ADDRESS_TWO_HOST) };
-        return many;
     }
 
     private Address mockAddress(final String name, final String domainList,

Modified: james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java (original)
+++ james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java Tue Jan 26 10:48:32 2016
@@ -147,10 +147,9 @@ public class NamespaceProcessorTest {
         final List<NamespaceResponse.Namespace> personalSpaces = new ArrayList<NamespaceResponse.Namespace>();
         personalSpaces.add(new NamespaceResponse.Namespace(PERSONAL_PREFIX, MailboxConstants.DEFAULT_DELIMITER));
         final List<NamespaceResponse.Namespace> otherUsersSpaces = new ArrayList<NamespaceResponse.Namespace>();
-        otherUsersSpaces.add(new NamespaceResponse.Namespace(USERS_PREFIX, MailboxConstants.DEFAULT_DELIMITER)); 
-        
-        final NamespaceResponse response = new NamespaceResponse(personalSpaces, otherUsersSpaces, sharedSpaces);
-        return response;
+        otherUsersSpaces.add(new NamespaceResponse.Namespace(USERS_PREFIX, MailboxConstants.DEFAULT_DELIMITER));
+
+        return new NamespaceResponse(personalSpaces, otherUsersSpaces, sharedSpaces);
     }
 
     private Responder expectResponse(final NamespaceResponse response) {

Modified: james/project/trunk/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java (original)
+++ james/project/trunk/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java Tue Jan 26 10:48:32 2016
@@ -19,8 +19,8 @@
 
 package org.apache.james.protocols.pop3.core;
 
-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.ProtocolSession.State;
 import org.apache.james.protocols.api.Response;
 import org.apache.james.protocols.api.handler.ConnectHandler;
@@ -29,16 +29,16 @@ import org.apache.james.protocols.pop3.P
 
 public class WelcomeMessageHandler implements ConnectHandler<POP3Session> {
 
-    @Override
-    public void init(Configuration config) throws ConfigurationException {
-
-    }
-
-    @Override
-    public void destroy() {
-
-    }
-
+    @Override
+    public void init(Configuration config) throws ConfigurationException {
+
+    }
+
+    @Override
+    public void destroy() {
+
+    }
+
     /**
      * @see org.apache.james.protocols.api.handler.ConnectHandler
      * #onConnect(org.apache.james.pop3server.POP3Session)
@@ -54,8 +54,7 @@ public class WelcomeMessageHandler imple
         
         // complete the response banner and send it back to the client
         responseBuffer.append("POP3 server (").append(session.getConfiguration().getSoftwareName()).append(") ready ");
-        POP3Response response = new POP3Response(POP3Response.OK_RESPONSE, responseBuffer.toString());
-        return response;
+        return new POP3Response(POP3Response.OK_RESPONSE, responseBuffer.toString());
     }
 
 }
\ No newline at end of file

Modified: james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java (original)
+++ james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java Tue Jan 26 10:48:32 2016
@@ -93,8 +93,7 @@ public class DataCmdHandler implements C
          */
         public Response onLine(SMTPSession session, ByteBuffer line) {
             line.rewind();
-            Response r = filter.onLine(session, line, next);
-            return r;
+            return filter.onLine(session, line, next);
         }
 
         @Override

Modified: james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataLineMessageHookHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataLineMessageHookHandler.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataLineMessageHookHandler.java (original)
+++ james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataLineMessageHookHandler.java Tue Jan 26 10:48:32 2016
@@ -157,10 +157,7 @@ public class DataLineMessageHookHandler
             }
 
             // Not queue the message!
-            SMTPResponse response = AbstractHookableCmdHandler.calcDefaultSMTPResponse(new HookResult(HookReturnCode.DENY));
-            return response;
-
-          
+            return AbstractHookableCmdHandler.calcDefaultSMTPResponse(new HookResult(HookReturnCode.DENY));
         }
         
         return null;

Modified: james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java (original)
+++ james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java Tue Jan 26 10:48:32 2016
@@ -355,11 +355,8 @@ public class AuthCmdHandler
        
         session.popLineHandler();
 
-        
         // Authenticate user
-        Response response = doAuthTest(session, user, pass, "LOGIN");
-       
-        return response;
+        return doAuthTest(session, user, pass, "LOGIN");
     }
 
 

Modified: james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java (original)
+++ james/project/trunk/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java Tue Jan 26 10:48:32 2016
@@ -66,9 +66,8 @@ public class MailSizeEsmtpExtension impl
      */
     public HookResult doMailParameter(SMTPSession session, String paramName,
             String paramValue) {
-        HookResult res = doMailSize(session, paramValue,
+        return doMailSize(session, paramValue,
                 (String) session.getAttachment(SMTPSession.SENDER, State.Transaction));
-        return res;
     }
 
     /**

Modified: james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/MaxRcptHandlerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/MaxRcptHandlerTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/MaxRcptHandlerTest.java (original)
+++ james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/MaxRcptHandlerTest.java Tue Jan 26 10:48:32 2016
@@ -41,23 +41,22 @@ import org.junit.Test;
 public class MaxRcptHandlerTest {
     
     private SMTPSession setupMockedSession(final int rcptCount) {
-        SMTPSession session = new BaseFakeSMTPSession() {
+        return new BaseFakeSMTPSession() {
             HashMap<String,Object> state = new HashMap<String,Object>();
 
             public Map<String,Object> getState() {
                 return state;
             }
-            
+
             public boolean isRelayingAllowed() {
                 return false;
             }
-            
+
             public int getRcptCount() {
                 return rcptCount;
             }
-            
+
         };
-        return session;
     }
     
     @Test

Modified: james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ResolvableEhloHeloHandlerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ResolvableEhloHeloHandlerTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ResolvableEhloHeloHandlerTest.java (original)
+++ james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ResolvableEhloHeloHandlerTest.java Tue Jan 26 10:48:32 2016
@@ -47,32 +47,32 @@ public class ResolvableEhloHeloHandlerTe
 
     private SMTPSession setupMockSession(final String argument,
              final boolean relaying, final boolean authRequired, final String user, final MailAddress recipient) {
-        
-        SMTPSession session = new BaseFakeSMTPSession() {
+
+        return new BaseFakeSMTPSession() {
 
             HashMap<String,Object> connectionMap = new HashMap<String,Object>();
             HashMap<String,Object> map = new HashMap<String,Object>();
-            
+
             public boolean isAuthSupported() {
                 return authRequired;
             }
-            
+
             public String getUser() {
                 return user;
             }
-            
+
             public Map<String,Object> getConnectionState() {
                 return connectionMap;
             }
-            
+
             public boolean isRelayingAllowed() {
                 return relaying;
             }
-            
+
             public Map<String,Object> getState() {
                 return map;
             }
-            
+
             /*
              * (non-Javadoc)
              * @see org.apache.james.protocols.api.ProtocolSession#setAttachment(java.lang.String, java.lang.Object, org.apache.james.protocols.api.ProtocolSession.State)
@@ -104,10 +104,8 @@ public class ResolvableEhloHeloHandlerTe
                     return connectionMap.get(key);
                 }
             }
-            
-        };
 
-        return session;
+        };
     }
     
     private ResolvableEhloHeloHandler createHandler() {

Modified: james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ValidSenderDomainHandlerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ValidSenderDomainHandlerTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ValidSenderDomainHandlerTest.java (original)
+++ james/project/trunk/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/core/fastfail/ValidSenderDomainHandlerTest.java Tue Jan 26 10:48:32 2016
@@ -60,7 +60,7 @@ public class ValidSenderDomainHandlerTes
     }
     
     private SMTPSession setupMockedSession(final MailAddress sender) {
-        SMTPSession session = new BaseFakeSMTPSession() {
+        return new BaseFakeSMTPSession() {
             HashMap<String,Object> map = new HashMap<String,Object>();
 
             public Map<String,Object> getState() {
@@ -69,7 +69,7 @@ public class ValidSenderDomainHandlerTes
 
                 return map;
             }
-            
+
             public boolean isRelayingAllowed() {
                 return false;
             }
@@ -101,9 +101,8 @@ public class ValidSenderDomainHandlerTes
                     return getState().get(key);
                 }
             }
-            
+
         };
-        return session;
     }
     
     

Modified: james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/JDBCUtil.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/JDBCUtil.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/JDBCUtil.java (original)
+++ james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/JDBCUtil.java Tue Jan 26 10:48:32 2016
@@ -77,8 +77,7 @@ abstract public 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);
         }
@@ -124,8 +123,7 @@ abstract public 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/server/container/util/src/main/java/org/apache/james/util/sql/SqlResources.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/SqlResources.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/SqlResources.java (original)
+++ james/project/trunk/server/container/util/src/main/java/org/apache/james/util/sql/SqlResources.java Tue Jan 26 10:48:32 2016
@@ -335,8 +335,7 @@ public class SqlResources {
             index = input.indexOf(find, index + find_length);
         }
 
-        String result = output.toString();
-        return result;
+        return output.toString();
     }
 
     /**

Modified: james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/MimeMessageStreamRepositorySource.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/MimeMessageStreamRepositorySource.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/MimeMessageStreamRepositorySource.java (original)
+++ james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/MimeMessageStreamRepositorySource.java Tue Jan 26 10:48:32 2016
@@ -74,8 +74,7 @@ public class MimeMessageStreamRepository
      * @return the String ID
      */
     public String getSourceId() {
-        String sourceIdBuffer = repositoryName + "/" + key;
-        return sourceIdBuffer;
+        return repositoryName + "/" + key;
     }
 
     /**

Modified: james/project/trunk/server/data/data-file/src/test/java/org/apache/james/domainlist/xml/XMLDomainListTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-file/src/test/java/org/apache/james/domainlist/xml/XMLDomainListTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-file/src/test/java/org/apache/james/domainlist/xml/XMLDomainListTest.java (original)
+++ james/project/trunk/server/data/data-file/src/test/java/org/apache/james/domainlist/xml/XMLDomainListTest.java Tue Jan 26 10:48:32 2016
@@ -44,7 +44,7 @@ public class XMLDomainListTest {
     }
 
     private DNSService setUpDNSServer(final String hostName) {
-        DNSService dns = new MockDNSService() {
+        return new MockDNSService() {
 
             @Override
             public String getHostName(InetAddress inet) {
@@ -61,7 +61,6 @@ public class XMLDomainListTest {
                 return InetAddress.getLocalHost();
             }
         };
-        return dns;
     }
 
     // See https://issues.apache.org/jira/browse/JAMES-998

Modified: james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/mailrepository/jcr/JCRMailRepository.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/mailrepository/jcr/JCRMailRepository.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/mailrepository/jcr/JCRMailRepository.java (original)
+++ james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/mailrepository/jcr/JCRMailRepository.java Tue Jan 26 10:48:32 2016
@@ -105,8 +105,7 @@ public class JCRMailRepository extends A
     }
 
     protected String toSafeName(String key) {
-        String name = ISO9075.encode(Text.escapeIllegalJcrChars(key));
-        return name;
+        return ISO9075.encode(Text.escapeIllegalJcrChars(key));
     }
 
     private Session login() throws RepositoryException {

Modified: james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/JCRUsersRepository.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/JCRUsersRepository.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/JCRUsersRepository.java (original)
+++ james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/JCRUsersRepository.java Tue Jan 26 10:48:32 2016
@@ -74,8 +74,7 @@ public class JCRUsersRepository extends
     }
 
     protected String toSafeName(String key) {
-        String name = ISO9075.encode(Text.escapeIllegalJcrChars(key));
-        return name;
+        return ISO9075.encode(Text.escapeIllegalJcrChars(key));
     }
 
     private Session login() throws RepositoryException {

Modified: james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/model/JCRUser.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/model/JCRUser.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/model/JCRUser.java (original)
+++ james/project/trunk/server/data/data-jcr/src/main/java/org/apache/james/user/jcr/model/JCRUser.java Tue Jan 26 10:48:32 2016
@@ -45,8 +45,7 @@ public class JCRUser implements User {
      */
     public static String hashPassword(String username, String password) {
         // Combine dynamic and static salt
-        final String hashedSaltedPassword = Text.md5(Text.md5(username + password) + SALT);
-        return hashedSaltedPassword;
+        return Text.md5(Text.md5(username + password) + SALT);
     }
 
     private final String userName;

Modified: james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/MimeMessageJDBCSource.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/MimeMessageJDBCSource.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/MimeMessageJDBCSource.java (original)
+++ james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/MimeMessageJDBCSource.java Tue Jan 26 10:48:32 2016
@@ -113,8 +113,7 @@ public class MimeMessageJDBCSource exten
      * @return the String ID
      */
     public String getSourceId() {
-        String sourceIdBuffer = repository.repositoryName + "/" + key;
-        return sourceIdBuffer;
+        return repository.repositoryName + "/" + key;
     }
 
     /**

Modified: james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/user/jdbc/DefaultUsersJdbcRepository.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/user/jdbc/DefaultUsersJdbcRepository.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/user/jdbc/DefaultUsersJdbcRepository.java (original)
+++ james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/user/jdbc/DefaultUsersJdbcRepository.java Tue Jan 26 10:48:32 2016
@@ -46,8 +46,7 @@ public class DefaultUsersJdbcRepository
         String username = rsUsers.getString(1);
         String passwordHash = rsUsers.getString(2);
         String passwordAlg = rsUsers.getString(3);
-        DefaultUser user = new DefaultUser(username, passwordHash, passwordAlg);
-        return user;
+        return new DefaultUser(username, passwordHash, passwordAlg);
     }
 
     @Override

Modified: james/project/trunk/server/data/data-library/src/test/java/org/apache/james/mailrepository/mock/MockMailRepositoryStore.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-library/src/test/java/org/apache/james/mailrepository/mock/MockMailRepositoryStore.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/data/data-library/src/test/java/org/apache/james/mailrepository/mock/MockMailRepositoryStore.java (original)
+++ james/project/trunk/server/data/data-library/src/test/java/org/apache/james/mailrepository/mock/MockMailRepositoryStore.java Tue Jan 26 10:48:32 2016
@@ -37,8 +37,7 @@ public class MockMailRepositoryStore imp
 
     @Override
     public MailRepository select(String url) throws MailRepositoryStoreException {
-        MailRepository result = get(url);
-        return result;
+        return get(url);
     }
 
     private MailRepository get(String key) {

Modified: james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailetManagement.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailetManagement.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailetManagement.java (original)
+++ james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailetManagement.java Tue Jan 26 10:48:32 2016
@@ -82,8 +82,7 @@ public final class MailetManagement exte
             String value = config.getInitParameter(name);
             parameterList.add(name + "=" + value);
         }
-        String[] result = parameterList.toArray(new String[parameterList.size()]);
-        return result;
+        return parameterList.toArray(new String[parameterList.size()]);
     }
 
     /**

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java Tue Jan 26 10:48:32 2016
@@ -530,8 +530,7 @@ public class DSNBounce extends AbstractN
      */
     @Override
     protected String[] getAllowedInitParameters() {
-        String[] allowedArray = {"debug", "passThrough", "messageString", "attachment", "sender", "prefix"};
-        return allowedArray;
+        return new String[]{"debug", "passThrough", "messageString", "attachment", "sender", "prefix"};
     }
 
     /**

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Forward.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Forward.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Forward.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Forward.java Tue Jan 26 10:48:32 2016
@@ -83,10 +83,9 @@ public class Forward extends AbstractRed
 
     /** Gets the expected init parameters. */
     protected String[] getAllowedInitParameters() {
-        String[] allowedArray = {
+        return new String[]{
                 // "static",
                 "debug", "passThrough", "fakeDomainCheck", "forwardto", "forwardTo" };
-        return allowedArray;
     }
 
     /**

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCAlias.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCAlias.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCAlias.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCAlias.java Tue Jan 26 10:48:32 2016
@@ -102,8 +102,7 @@ public class JDBCAlias extends GenericMa
             }
 
             // Build the query
-            String queryBuffer = "SELECT " + getInitParameter("target_column") + " FROM " + tableName + " WHERE " + getInitParameter("source_column") + " = ?";
-            query = queryBuffer;
+            query = "SELECT " + getInitParameter("target_column") + " FROM " + tableName + " WHERE " + getInitParameter("source_column") + " = ?";
         } catch (MailetException me) {
             throw me;
         } catch (Exception e) {
@@ -130,8 +129,7 @@ public class JDBCAlias extends GenericMa
 
             for (MailAddress recipient : recipients) {
                 try {
-                    MailAddress source = recipient;
-                    mappingStmt.setString(1, source.toString());
+                    mappingStmt.setString(1, recipient.toString());
                     mappingRS = mappingStmt.executeQuery();
                     if (!mappingRS.next()) {
                         // This address was not found
@@ -143,12 +141,12 @@ public class JDBCAlias extends GenericMa
 
                         // Mark this source address as an address to remove from
                         // the recipient list
-                        recipientsToRemove.add(source);
+                        recipientsToRemove.add(recipient);
                         recipientsToAdd.add(target);
                     } catch (ParseException pe) {
                         // Don't alias this address... there's an invalid
                         // address mapping here
-                        String exceptionBuffer = "There is an invalid alias from " + source + " to " + mappingRS.getString(1);
+                        String exceptionBuffer = "There is an invalid alias from " + recipient + " to " + mappingRS.getString(1);
                         log(exceptionBuffer);
                     }
                 } finally {

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCRecipientRewriteTable.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCRecipientRewriteTable.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCRecipientRewriteTable.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/JDBCRecipientRewriteTable.java Tue Jan 26 10:48:32 2016
@@ -190,14 +190,13 @@ public class JDBCRecipientRewriteTable e
             for (MailAddress recipient : recipients) {
                 ResultSet mappingRS = null;
                 try {
-                    MailAddress source = recipient;
-                    mappingStmt.setString(1, source.getLocalPart());
-                    mappingStmt.setString(2, source.getDomain());
-                    mappingStmt.setString(3, source.getDomain());
+                    mappingStmt.setString(1, recipient.getLocalPart());
+                    mappingStmt.setString(2, recipient.getDomain());
+                    mappingStmt.setString(3, recipient.getDomain());
                     mappingRS = mappingStmt.executeQuery();
                     if (mappingRS.next()) {
                         String targetString = mappingRS.getString(1);
-                        recipientsMap.put(source, targetString);
+                        recipientsMap.put(recipient, targetString);
                     }
                 } finally {
                     theJDBCUtil.closeJDBCResultSet(mappingRS);

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifyPostmaster.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifyPostmaster.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifyPostmaster.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifyPostmaster.java Tue Jan 26 10:48:32 2016
@@ -111,10 +111,9 @@ public class NotifyPostmaster extends Ab
 
     /** Gets the expected init parameters. */
     protected String[] getAllowedInitParameters() {
-        String[] allowedArray = {
+        return new String[]{
                 // "static",
                 "debug", "passThrough", "fakeDomainCheck", "inline", "attachment", "message", "notice", "sender", "sendingAddress", "prefix", "attachError", "attachStackTrace", "to" };
-        return allowedArray;
     }
 
     /**

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifySender.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifySender.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifySender.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/NotifySender.java Tue Jan 26 10:48:32 2016
@@ -110,10 +110,9 @@ public class NotifySender extends Abstra
 
     /** Gets the expected init parameters. */
     protected String[] getAllowedInitParameters() {
-        String[] allowedArray = {
+        return new String[]{
                 // "static",
                 "debug", "passThrough", "fakeDomainCheck", "inline", "attachment", "message", "notice", "sender", "sendingAddress", "prefix", "attachError", "attachStackTrace", "to" };
-        return allowedArray;
     }
 
     /**

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Redirect.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Redirect.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Redirect.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Redirect.java Tue Jan 26 10:48:32 2016
@@ -292,8 +292,7 @@ public class Redirect extends AbstractRe
 
     /** Gets the expected init parameters. */
     protected String[] getAllowedInitParameters() {
-        String[] allowedArray = { "static", "debug", "passThrough", "fakeDomainCheck", "inline", "attachment", "message", "recipients", "to", "replyTo", "replyto", "reversePath", "sender", "subject", "prefix", "attachError", "isReply" };
-        return allowedArray;
+        return new String[]{ "static", "debug", "passThrough", "fakeDomainCheck", "inline", "attachment", "message", "recipients", "to", "replyTo", "replyto", "reversePath", "sender", "subject", "prefix", "attachError", "isReply" };
     }
 
     /**

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Resend.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Resend.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Resend.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Resend.java Tue Jan 26 10:48:32 2016
@@ -279,10 +279,9 @@ public class Resend extends AbstractRedi
 
     /** Gets the expected init parameters. */
     protected String[] getAllowedInitParameters() {
-        String[] allowedArray = {
+        return new String[]{
                 // "static",
                 "debug", "passThrough", "fakeDomainCheck", "inline", "attachment", "message", "recipients", "to", "replyTo", "replyto", "reversePath", "sender", "subject", "prefix", "attachError", "isReply" };
-        return allowedArray;
     }
 
 }

Modified: james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/WhiteListManager.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/WhiteListManager.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/WhiteListManager.java (original)
+++ james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/WhiteListManager.java Tue Jan 26 10:48:32 2016
@@ -315,9 +315,8 @@ public class WhiteListManager extends Ge
             for (MailAddress recipient : recipients) {
                 ResultSet selectRS = null;
                 try {
-                    MailAddress recipientMailAddress = recipient;
-                    String recipientUser = recipientMailAddress.getLocalPart().toLowerCase(Locale.US);
-                    String recipientHost = recipientMailAddress.getDomain().toLowerCase(Locale.US);
+                    String recipientUser = recipient.getLocalPart().toLowerCase(Locale.US);
+                    String recipientHost = recipient.getDomain().toLowerCase(Locale.US);
 
                     if (getMailetContext().isLocalServer(recipientHost)) {
                         // not a remote recipient, so skip

Modified: james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/InSpammerBlacklistTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/InSpammerBlacklistTest.java?rev=1726770&r1=1726769&r2=1726770&view=diff
==============================================================================
--- james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/InSpammerBlacklistTest.java (original)
+++ james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/InSpammerBlacklistTest.java Tue Jan 26 10:48:32 2016
@@ -41,7 +41,7 @@ public class InSpammerBlacklistTest {
     private final static StringBuffer LISTED_HOST = new StringBuffer("111.222.111.222");
 
     private DNSService setUpDNSServer() {
-        DNSService dns = new MockDNSService() {
+        return new MockDNSService() {
 
             @Override
             public InetAddress getByName(String name) throws UnknownHostException {
@@ -52,7 +52,6 @@ public class InSpammerBlacklistTest {
                 }
             }
         };
-        return dns;
     }
 
     private void setupMockedMail(String remoteAddr) throws ParseException {




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