You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2008/05/20 15:59:15 UTC
svn commit: r658248 -
/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java
Author: rickmcguire
Date: Tue May 20 06:59:15 2008
New Revision: 658248
URL: http://svn.apache.org/viewvc?rev=658248&view=rev
Log:
GERONIMO-4033 QuotedPrintableEncoder.decode(InputStream) doesn't handle space before soft newline
patch provided by aaron pieper
Modified:
geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java
Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java?rev=658248&r1=658247&r2=658248&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java (original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java Tue May 20 06:59:15 2008
@@ -576,14 +576,16 @@
// return the real significant character now.
return ch;
}
- else {
- // remember this character for later, after we've used up the deferred blanks.
- cachedCharacter = ch;
- // return this space. We did not include this one in the deferred count, so we're right in sync.
- return ' ';
- }
+ // remember this character for later, after we've used up the deferred blanks.
+ cachedCharacter = decodeNonspaceChar(in, ch);
+ // return this space. We did not include this one in the deferred count, so we're right in sync.
+ return ' ';
}
- else if (ch == '=') {
+ return decodeNonspaceChar(in, ch);
+ }
+
+ private int decodeNonspaceChar(InputStream in, int ch) throws IOException {
+ if (ch == '=') {
int b1 = in.read();
// we need to get two characters after the quotation marker
if (b1 == -1) {