noel        2003/02/26 13:57:11

  Modified:    src/java/org/apache/mailet MailAddress.java
  Log:
  Fixed boundary conditions.  Thanks to Andre Schild for identifying the problem.
  
  Revision  Changes    Path
  1.11      +3 -3      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MailAddress.java  14 Jan 2003 13:42:10 -0000      1.10
  +++ MailAddress.java  26 Feb 2003 21:57:11 -0000      1.11
  @@ -236,7 +236,7 @@
                   pos++;
                   //<x> ::= any one of the 128 ASCII characters (no exceptions)
                   char x = address.charAt(pos);
  -                if (x < 0 || x > 128) {
  +                if (x < 0 || x > 127) {
                       throw new ParseException("Invalid \\ syntaxed character at 
position " + (pos + 1));
                   }
                   resultSB.append(x);
  @@ -267,7 +267,7 @@
                   pos++;
                   //<x> ::= any one of the 128 ASCII characters (no exceptions)
                   char x = address.charAt(pos);
  -                if (x < 0 || x > 128) {
  +                if (x < 0 || x > 127) {
                       throw new ParseException("Invalid \\ syntaxed character at 
position " + (pos + 1));
                   }
                   resultSB.append(x);
  @@ -289,7 +289,7 @@
                   //    127)
                   //<SP> ::= the space character (ASCII code 32)
                   char c = address.charAt(pos);
  -                if (c <= 31 || c == 127 || c == ' ') {
  +                if (c <= 31 || c >= 127 || c == ' ') {
                       throw new ParseException("Invalid character in local-part (user 
account) at position " + (pos + 1));
                   }
                   for (int i = 0; i < SPECIAL.length; i++) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to