james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/mailet MailAddress.java
Date Mon, 02 Jun 2003 06:02:26 GMT
noel        2003/06/01 23:02:25

  Modified:    src/java/org/apache/mailet Tag: branch_2_1_fcs
                        MailAddress.java
  Log:
  Check boundary case so that we can throw the semantic exception instead of an out of bounds
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.4.4   +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.8.4.3
  retrieving revision 1.8.4.4
  diff -u -r1.8.4.3 -r1.8.4.4
  --- MailAddress.java	8 Mar 2003 21:54:13 -0000	1.8.4.3
  +++ MailAddress.java	2 Jun 2003 06:02:25 -0000	1.8.4.4
  @@ -143,7 +143,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: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message