noel 2003/06/01 23:21:24
Modified: src/java/org/apache/mailet MailAddress.java
Log:
Check boundary case so that we can throw the semantic exception instead of an out of
bounds
Revision Changes Path
1.14 +1 -1 jakarta-james/src/java/org/apache/mailet/MailAddress.java
Index: MailAddress.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/mailet/MailAddress.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- MailAddress.java 8 Mar 2003 21:14:14 -0000 1.13
+++ MailAddress.java 2 Jun 2003 06:21:24 -0000 1.14
@@ -139,7 +139,7 @@
}
//find @
- if (address.charAt(pos) != '@') {
+ if (pos >= address.length() || address.charAt(pos) != '@') {
throw new ParseException("Did not find @ between local-part and
domain at position " + (pos + 1));
}
pos++;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]