Author: norman
Date: Thu Jan 11 02:45:43 2007
New Revision: 495179

URL: http://svn.apache.org/viewvc?view=rev&rev=495179
Log:
Remove duplicate code.

Modified:
    james/server/trunk/src/java/org/apache/james/transport/LinearProcessor.java

Modified: 
james/server/trunk/src/java/org/apache/james/transport/LinearProcessor.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/transport/LinearProcessor.java?view=diff&rev=495179&r1=495178&r2=495179
==============================================================================
--- james/server/trunk/src/java/org/apache/james/transport/LinearProcessor.java 
(original)
+++ james/server/trunk/src/java/org/apache/james/transport/LinearProcessor.java 
Thu Jan 11 02:45:43 2007
@@ -58,7 +58,6 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
-import java.util.Random;
 
 /**
  * Implements a processor for mails, directing the mail down
@@ -97,8 +96,6 @@
     extends AbstractLogEnabled
     implements Disposable, Configurable, Serviceable, MailProcessor, 
MailetContainer {
 
-    private static final Random random = new Random();  // Used to generate 
new mail names
-
     /**
      *  The name of the matcher used to terminate the matcher chain.  The
      *  end of the matcher/mailet chain must be a matcher that matches
@@ -431,7 +428,7 @@
                 // There are a mix of recipients and not recipients.
                 // We need to clone this message, put the notRecipients on the 
clone
                 // and store it in the next spot
-                Mail notMail = new MailImpl(mail,newName(mail));
+                Mail notMail = new MailImpl(mail);
                 notMail.setRecipients(notRecipients);
                 // set the state to the current processor
                 notMail.setState(originalState);
@@ -499,22 +496,6 @@
 
         }
     }
-
-    /**
-     * Create a unique new primary key name.
-     *
-     * @param mail the mail to use as the basis for the new mail name
-     * @return a new name
-     */
-    private String newName(Mail mail) {
-        StringBuffer nameBuffer =
-            new StringBuffer(64)
-                    .append(mail.getName())
-                    .append("-!")
-                    .append(random.nextInt(1048576));
-        return nameBuffer.toString();
-    }
-
 
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to