I had simular problems...
I tried different ways for mail addresses:
- a -> StringIndexOutOfBoundsException
- a@ -> StringIndexOutOfBoundsException
- a@b -> OK
- a@b. -> StringIndexOutOfBoundsException
- [EMAIL PROTECTED] -> OK
The following small patch will throw a ParseException instead of a
uncatched StringIndexOutOfBoundsException!
Question:
Is '[EMAIL PROTECTED]' a correct mail address?
Buchi
Index: MailAddress.java
===================================================================
RCS file: /home/cvspublic/jakarta-james/src/java/org/apache/mailet/MailAddress.java,v
retrieving revision 1.1
diff -u -r1.1 MailAddress.java
--- MailAddress.java 2001/05/11 08:50:26 1.1
+++ MailAddress.java 2001/08/03 14:00:39
@@ -118,7 +118,7 @@
if (hostSB.toString().length() == 0) {
throw new ParseException("No domain found at position " + (pos + 1));
}
- } catch (ArrayIndexOutOfBoundsException aioobe) {
+ } catch (IndexOutOfBoundsException ioobe) {
throw new ParseException("Out of data at position " + (pos + 1));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]