fixing master build
git-svn-id: https://svn.apache.org/repos/asf/geronimo/javamail/trunk@1827416 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java b/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
index 9370451..d104afa 100644
--- a/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
+++ b/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
@@ -180,7 +180,7 @@
}
// if we have a name, we might need to decode this if an additional property is set.
- if (filename != null && SessionUtil.getBooleanProperty(MIME_DECODEFILENAME, false)) {
+ if (filename != null && SessionUtil.getBooleanProperty("mail.mime.decodefilename", false)) {
try {
filename = MimeUtility.decodeText(filename);
} catch (UnsupportedEncodingException e) {
diff --git a/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/test/java/org/apache/geronimo/javamail/issues/GERONIMO6480Test.java b/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/test/java/org/apache/geronimo/javamail/issues/GERONIMO6480Test.java
index e999475..f836764 100755
--- a/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/test/java/org/apache/geronimo/javamail/issues/GERONIMO6480Test.java
+++ b/geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/test/java/org/apache/geronimo/javamail/issues/GERONIMO6480Test.java
@@ -37,17 +37,19 @@
import org.apache.geronimo.javamail.testserver.AbstractProtocolTest;
public class GERONIMO6480Test extends AbstractProtocolTest {
-
public void testGERONIMO6480_0() throws Exception {
+ System.setProperty("mail.mime.setcontenttypefilename", "false");
BodyPart attachmentPart = new MimeBodyPart();
attachmentPart.setDataHandler(new DataHandler(new FileDataSource(getAbsoluteFilePathFromClassPath("pdf-test.pdf"))));
attachmentPart.setFileName("test.pdf");
String contentType = getSendedAttachmentContentType(attachmentPart);
Assert.assertEquals("application/octet-stream; name=test.pdf".toLowerCase(), contentType.toLowerCase());
// "text/plain; name=test.pdf" with Geronimo because setFileName force it to 'text/plain' when adding the 'name=' part instead of keeping it null
+ System.clearProperty("mail.mime.setcontenttypefilename");
}
public void testGERONIMO6480_1() throws Exception {
+ System.setProperty("mail.mime.setcontenttypefilename", "false");
BodyPart attachmentPart = new MimeBodyPart();
attachmentPart.addHeader("Content-Type", "aplication/pdf");
// setDataHandler reset "Content-Type" so equivalent to previous test
@@ -56,6 +58,7 @@
String contentType = getSendedAttachmentContentType(attachmentPart);
Assert.assertEquals("application/octet-stream; name=test.pdf".toLowerCase(), contentType.toLowerCase());
// "text/plain; name=test.pdf" with Geronimo because setFileName force it to 'text/plain' when adding the 'name=' part instead of keeping it null
+ System.clearProperty("mail.mime.setcontenttypefilename");
}
public void testGERONIMO6480_2() throws Exception {
diff --git a/geronimo-javamail_1.5/pom.xml b/geronimo-javamail_1.5/pom.xml
index 2e56e24..3e2c910 100644
--- a/geronimo-javamail_1.5/pom.xml
+++ b/geronimo-javamail_1.5/pom.xml
@@ -65,7 +65,7 @@
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.5_spec</artifactId>
- <version>${project.version}</version>
+ <version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@@ -125,7 +125,6 @@
</pluginManagement>
<plugins>
-
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>