Noel J. Bergman wrote:
>> Here is my proposed patch against current 2.3 branch
> 
> OK.
> 
>> Index: james-2.3/src/java/org/apache/james/core/MailImpl.java
>> +        if (this.message != null && this.message != message)
> 
> Is there any reason to execute any of the method body if the above is true?
> 
>       --- Noel

Yes, the "this.message = message" has to be called when that condition
is true. We could skip to set it when "this.message == message" but I
thought that 99.9% of times the message will be different and so it is
more performant to skip the condition and simply make the new assignment
every time.
Btw this is not important at all.. if you prefer we can even add an
if (this.message != message) {

}
around all of the message body as an alternative patch.
---------
public void setMessage(MimeMessage message) {
   if (this.message != message) {
        if (this.message != null) {
            ContainerUtil.dispose(this.message);
        }
        this.message = message;
   }
}
---------

Stefano


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

Reply via email to