INT-1475, addressed the issue. Made 'should-delete-messages' required by the schema and added tests to validate it. Added more tests for Pop3MailReceiever. Modified documentation to explain the change and reasoning behind the change
This commit is contained in:
@@ -60,7 +60,7 @@ public abstract class AbstractMailReceiver extends IntegrationObjectSupport impl
|
||||
|
||||
private volatile Folder folder;
|
||||
|
||||
private volatile boolean shouldDeleteMessages = false;
|
||||
private volatile boolean shouldDeleteMessages;
|
||||
|
||||
protected volatile int folderOpenMode = Folder.READ_ONLY;
|
||||
|
||||
@@ -80,13 +80,13 @@ public abstract class AbstractMailReceiver extends IntegrationObjectSupport impl
|
||||
public AbstractMailReceiver(URLName urlName) {
|
||||
Assert.notNull(urlName, "urlName must not be null");
|
||||
this.url = urlName;
|
||||
this.shouldDeleteMessages = urlName.getProtocol().startsWith("pop3");
|
||||
//this.shouldDeleteMessages = urlName.getProtocol().startsWith("pop3");
|
||||
}
|
||||
|
||||
public AbstractMailReceiver(String url) {
|
||||
if (url != null) {
|
||||
this.url = new URLName(url);
|
||||
this.shouldDeleteMessages = this.url.getProtocol().startsWith("pop3");
|
||||
//this.shouldDeleteMessages = this.url.getProtocol().startsWith("pop3");
|
||||
}
|
||||
else {
|
||||
this.url = null;
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="should-delete-messages" type="xsd:string" use="optional" default="false">
|
||||
<xsd:attribute name="should-delete-messages" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Specify whether mail messages should be deleted after retrieval.
|
||||
|
||||
Reference in New Issue
Block a user