[ http://issues.apache.org/jira/browse/JAMES-474?page=comments#action_12373723 ]
Martijn Brinkers commented on JAMES-474: ---------------------------------------- Should'nt access to some (or all?) variables like modified, bodyModified etc. be synchronized? The method: public synchronized void setDataHandler(DataHandler arg0) throws MessagingException changes modified and bodyModified and it's synchonized but all other access to modified and bodyModified is not synchronized. The constructor for example checks bodyModified but access to bodyModified is not synchronized. A context switch can occur in setDataHandler just before bodyModified is set to true which results in an 'out-of-sync' between what the constructor 'sees' and what setDataHandler 'sees'. A related question. Why are all variables protected and not private using getters/setters? Having them private with getters/setters would make it easier to add thread safety. > NullPointerException and bodymessage lost with weird configurations in > message spooling > --------------------------------------------------------------------------------------- > > Key: JAMES-474 > URL: http://issues.apache.org/jira/browse/JAMES-474 > Project: James > Type: Bug > Components: James Core > Versions: 2.3.0a1 > Reporter: Stefano Bagnara > Assignee: Stefano Bagnara > Priority: Critical > > Under particular condition the new MimeMessageWrapper optimization code seems > to loose the message source. > I've already created a unittest for this and I remove the optimization, but > this need a fix. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]