You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/10/05 11:20:54 UTC
[camel] branch main updated: CAMEL-18584: Constructor of mailBinding fixed (#8482)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 9b3f321e092 CAMEL-18584: Constructor of mailBinding fixed (#8482)
9b3f321e092 is described below
commit 9b3f321e09235d70919fe76ff60c217872157e96
Author: Manuel <48...@users.noreply.github.com>
AuthorDate: Wed Oct 5 13:20:48 2022 +0200
CAMEL-18584: Constructor of mailBinding fixed (#8482)
* CAMEL-18584: Constructor of mailBinding fixed
* CAMEL-18584: Constructor of mailBinding fixed
---
.../java/org/apache/camel/component/mail/MailBinding.java | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
index 90632ddecc0..6a95c81934a 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
@@ -62,7 +62,9 @@ import org.apache.camel.util.StringHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import static org.apache.camel.component.mail.MailConstants.MAIL_GENERATE_MISSING_ATTACHMENT_NAMES_NEVER;
import static org.apache.camel.component.mail.MailConstants.MAIL_GENERATE_MISSING_ATTACHMENT_NAMES_UUID;
+import static org.apache.camel.component.mail.MailConstants.MAIL_HANDLE_DUPLICATE_ATTACHMENT_NAMES_NEVER;
/**
* A Strategy used to convert between a Camel {@link Exchange} and {@link Message} to and from a Mail
@@ -86,12 +88,21 @@ public class MailBinding {
@Deprecated
public MailBinding(HeaderFilterStrategy headerFilterStrategy, ContentTypeResolver contentTypeResolver,
boolean decodeFilename) {
- this(headerFilterStrategy, contentTypeResolver, decodeFilename, true, false, "never", "never");
+ this(headerFilterStrategy, contentTypeResolver, decodeFilename, true, false,
+ MAIL_GENERATE_MISSING_ATTACHMENT_NAMES_NEVER, MAIL_HANDLE_DUPLICATE_ATTACHMENT_NAMES_NEVER);
}
public MailBinding(HeaderFilterStrategy headerFilterStrategy, ContentTypeResolver contentTypeResolver,
boolean decodeFilename, boolean mapMailMessage) {
- this(headerFilterStrategy, contentTypeResolver, decodeFilename, mapMailMessage, false, "never", "never");
+ this(headerFilterStrategy, contentTypeResolver, decodeFilename, mapMailMessage, false,
+ MAIL_GENERATE_MISSING_ATTACHMENT_NAMES_NEVER, MAIL_HANDLE_DUPLICATE_ATTACHMENT_NAMES_NEVER);
+ }
+
+ public MailBinding(HeaderFilterStrategy headerFilterStrategy, ContentTypeResolver contentTypeResolver,
+ boolean decodeFilename, boolean mapMailMessage,
+ boolean failOnDuplicateAttachment) {
+ this(headerFilterStrategy, contentTypeResolver, decodeFilename, mapMailMessage, failOnDuplicateAttachment,
+ MAIL_GENERATE_MISSING_ATTACHMENT_NAMES_NEVER, MAIL_HANDLE_DUPLICATE_ATTACHMENT_NAMES_NEVER);
}
public MailBinding(HeaderFilterStrategy headerFilterStrategy, ContentTypeResolver contentTypeResolver,