noel 2003/07/03 01:32:51
Modified: src/java/org/apache/james/transport/mailets
AbstractRedirect.java
Log:
Hontvari Jozsef's patch to avoid NPE when no subject present.
Revision Changes Path
1.16 +4 -2
james-server/src/java/org/apache/james/transport/mailets/AbstractRedirect.java
Index: AbstractRedirect.java
===================================================================
RCS file:
/home/cvs/james-server/src/java/org/apache/james/transport/mailets/AbstractRedirect.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AbstractRedirect.java 3 Jul 2003 05:27:39 -0000 1.15
+++ AbstractRedirect.java 3 Jul 2003 08:32:50 -0000 1.16
@@ -1741,11 +1741,13 @@
* Here is an example raw text:
* Subject: =?iso-8859-2?Q?leg=FAjabb_pr=F3ba_l=F5elemmel?=
*
- * @param rawText the raw (not decoded) value of the header
+ * @param rawText the raw (not decoded) value of the header. Null means
+ * that the header was not present (in this case it always return null).
* @return the MIME charset name or null if no encoding applied
*/
static private String determineMailHeaderEncodingCharset(String rawText)
{
+ if (rawText == null) return null;
int iEncodingPrefix = rawText.indexOf("=?");
if (iEncodingPrefix == -1) return null;
int iCharsetBegin = iEncodingPrefix + 2;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]