Author: norman
Date: Wed Aug 10 12:56:42 2011
New Revision: 1156159

URL: http://svn.apache.org/viewvc?rev=1156159&view=rev
Log:
Only log error on non null values. See JAMES-1294

Modified:
    
james/server/trunk/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java

Modified: 
james/server/trunk/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java?rev=1156159&r1=1156158&r2=1156159&view=diff
==============================================================================
--- 
james/server/trunk/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
 (original)
+++ 
james/server/trunk/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
 Wed Aug 10 12:56:42 2011
@@ -423,10 +423,14 @@ public class JMSMailQueue implements Man
             // Now cast the property back to Serializable and set it as 
attribute.
             // See JAMES-1241
             Object attrValue = message.getObjectProperty(name);
-            if ( attrValue instanceof Serializable) {   
-                mail.setAttribute(name, (Serializable) attrValue);
-            } else {
-                logger.error("Not supported mail attribute " + name + " of 
type " + attrValue);
+           
+            // ignore null values. See JAMES-1294
+            if (attrValue != null) {
+                if (attrValue instanceof Serializable) {   
+                    mail.setAttribute(name, (Serializable) attrValue);
+                } else {
+                    logger.error("Not supported mail attribute " + name + " of 
type " + attrValue + " for mail " + mail.getName());
+                }
             }
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to