james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r404780 - /james/server/trunk/src/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java
Date Sun, 07 May 2006 14:59:16 GMT
Author: bago
Date: Sun May  7 07:59:13 2006
New Revision: 404780

URL: http://svn.apache.org/viewcvs?rev=404780&view=rev
Log:
Possible fix for an NPE whose test has been just added to MimeMessageCopyOnWriteProxy (maybe
related to JAMES-474)

Modified:
    james/server/trunk/src/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java

Modified: james/server/trunk/src/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java?rev=404780&r1=404779&r2=404780&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java (original)
+++ james/server/trunk/src/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java Sun
May  7 07:59:13 2006
@@ -125,6 +125,7 @@
         super(Session.getDefaultInstance(System.getProperties(), null));
 
         this.wrapped = original;
+
         if (wrapped instanceof MimeMessageCopyOnWriteProxy) {
             refCount = ((MimeMessageCopyOnWriteProxy) wrapped).refCount;
             wrapped = ((MimeMessageCopyOnWriteProxy) wrapped).getWrappedMessage();
@@ -132,9 +133,12 @@
             refCount = new ReferenceCounter();
         }
         
+        refCount.incrementReferenceCount();
+        /* Experimental: See JAMES-474
         if (!writeable) {
             refCount.incrementReferenceCount();
         }
+				*/
     }
 
     /**



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