Details
Description
Consider org.apache.james.queue.activemq.FileSystemBlobStrategy#getFile(ActiveMQBlobMessage):
protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException {
...
// check if we need to create the queue folder
if (queueF.exists() == false) {
if (!queueF.mkdirs())
}
...
}
Suppose this method is called from two threads. If both threads get past the condition
if (queueF.exists() == false),
then the first one will create queueF. For the second, queueF.mkdirs() will then return false, which leads to an IOException even though everything is fine. I think the condition should be replaced by
if (!queueF.mkdirs() && !queueF.exists()).
Attachments
Attachments
Issue Links
- relates to
-
JAMES-1208 FileSystemBlobStrategy getFile doesn't fails, when a needed directory couldn't be created
- Closed