geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1641698 - in /geronimo/javamail/trunk/geronimo-javamail_1.4: ./ geronimo-javamail_1.4_provider/ geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/ geronimo-javamail_1.4_provider/src/main/java/org/apache/g...
Date Tue, 25 Nov 2014 21:20:40 GMT
Author: salyh
Date: Tue Nov 25 21:20:39 2014
New Revision: 1641698

URL: http://svn.apache.org/r1641698
Log:
Fix GERONIMO-4594. From this commit javamail 1.4 spec 1.7.2 or later is required.

Modified:
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceInputStream.java
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
    geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml?rev=1641698&r1=1641697&r2=1641698&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml Tue
Nov 25 21:20:39 2014
@@ -103,7 +103,8 @@
                             javax.imageio*;resolution:="optional",
                             javax.net.ssl*;resolution:="optional",
                             javax.security.sasl*;resolution:="optional",
-                            javax.security.auth.callback*;resolution:="optional"
+                            javax.security.auth.callback*;resolution:="optional",
+                            org.apache.geronimo.mail.james.mime4j.codec
                         </Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java?rev=1641698&r1=1641697&r2=1641698&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPMimeBodyPart.java
Tue Nov 25 21:20:39 2014
@@ -19,19 +19,18 @@ package org.apache.geronimo.javamail.sto
 
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
-import java.util.Enumeration; 
+import java.util.Enumeration;
 
-import javax.activation.DataHandler;   
-
-import javax.mail.IllegalWriteException; 
+import javax.activation.DataHandler;
+import javax.mail.IllegalWriteException;
 import javax.mail.MessagingException;
 import javax.mail.Multipart;
-
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeUtility;
 
 import org.apache.geronimo.javamail.store.imap.connection.IMAPBodyStructure;
 import org.apache.geronimo.javamail.store.imap.connection.IMAPConnection;
+import org.apache.geronimo.mail.util.SessionUtil;
 
 
 public class IMAPMimeBodyPart extends MimeBodyPart {
@@ -179,6 +178,16 @@ public class IMAPMimeBodyPart extends Mi
         if (filename == null) {
             filename = bodyStructure.mimeType.getParameter("name");
         }
+        
+        // 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)) {
+            try {
+                filename = MimeUtility.decodeText(filename);
+            } catch (UnsupportedEncodingException e) {
+                throw new MessagingException("Unable to decode filename", e);
+            }
+        }
+        
         return filename;
     }
 

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceInputStream.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceInputStream.java?rev=1641698&r1=1641697&r2=1641698&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceInputStream.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceInputStream.java
Tue Nov 25 21:20:39 2014
@@ -24,7 +24,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.geronimo.mail.util.QuotedPrintableEncoderStream;
+import org.apache.geronimo.mail.james.mime4j.codec.QuotedPrintableOutputStream;
 
 /**
  * @version $Rev$ $Date$
@@ -50,7 +50,7 @@ public class TraceInputStream extends Fi
         super(in);
         this.debug = debug;
         if (encode) {
-            this.traceStream = new QuotedPrintableEncoderStream(traceStream);
+            this.traceStream = new QuotedPrintableOutputStream(traceStream, false);
         } else {
             this.traceStream = traceStream;
         }

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceOutputStream.java?rev=1641698&r1=1641697&r2=1641698&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
Tue Nov 25 21:20:39 2014
@@ -23,7 +23,7 @@ import java.io.FilterOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.geronimo.mail.util.QuotedPrintableEncoderStream;
+import org.apache.geronimo.mail.james.mime4j.codec.QuotedPrintableOutputStream;
 
 /**
  * @version $Rev$ $Date$
@@ -49,7 +49,7 @@ public class TraceOutputStream extends F
         super(out);
         this.debug = debug;
         if (encode) {
-            this.traceStream = new QuotedPrintableEncoderStream(traceStream);
+            this.traceStream = new QuotedPrintableOutputStream(traceStream, false);
         } else {
             this.traceStream = traceStream;
         }

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml?rev=1641698&r1=1641697&r2=1641698&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml Tue Nov 25 21:20:39 2014
@@ -72,7 +72,7 @@
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>geronimo-javamail_1.4_spec</artifactId>
-                <version>1.7.1</version>
+                <version>1.7.2-SNAPSHOT</version>
             </dependency>
 
             <dependency>



Mime
View raw message