From d5e1551ee2e74c9e5c26afb589506de862f76e43 Mon Sep 17 00:00:00 2001 From: Pascal Schumacher Date: Fri, 18 Dec 2015 21:15:31 +0100 Subject: [PATCH] CAMEL-9433: Update to javax-mail 1.5.5 --- components/camel-mail/pom.xml | 5 ++--- .../component/mail/MailAttachmentsUmlautIssueTest.java | 9 +++++---- parent/pom.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/camel-mail/pom.xml b/components/camel-mail/pom.xml index a3daa79d4dda3..5025dbb796dfd 100644 --- a/components/camel-mail/pom.xml +++ b/components/camel-mail/pom.xml @@ -52,8 +52,8 @@ camel-core - javax.mail - mail + com.sun.mail + javax.mail ${javax-mail-version} @@ -100,7 +100,6 @@ commons-io commons-io - ${commons-io-version} test diff --git a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentsUmlautIssueTest.java b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentsUmlautIssueTest.java index 4e490d23bf64f..fa9805c9b171f 100644 --- a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentsUmlautIssueTest.java +++ b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentsUmlautIssueTest.java @@ -16,7 +16,10 @@ */ package org.apache.camel.component.mail; +import java.net.URLEncoder; +import java.nio.charset.Charset; import java.util.Map; + import javax.activation.DataHandler; import javax.activation.FileDataSource; @@ -78,10 +81,8 @@ public void testSendAndReceiveMailWithAttachments() throws Exception { DataHandler handler = out.getIn().getAttachment(name); assertNotNull("The " + name + " should be there", handler); - // content type should match - boolean match1 = ("image/jpeg; name=\"" + name + "\"").equals(handler.getContentType()); - boolean match2 = ("application/octet-stream; name=\"" + name + "\"").equals(handler.getContentType()); - assertTrue("Should match 1 or 2", match1 || match2); + String nameURLEncoded = URLEncoder.encode(name, Charset.defaultCharset().name()); + assertTrue("Handler content type should end with URL-encoded name", handler.getContentType().endsWith(nameURLEncoded)); assertEquals("Handler name should be the file name", name, handler.getName()); diff --git a/parent/pom.xml b/parent/pom.xml index 0ff361039af5c..fa3b259151a70 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -258,7 +258,7 @@ 2.2.5 2.2.5 1_2 - 1.4.7 + 1.5.5 3.1.0 2.2.6_1 1.1.6