noel        2003/02/26 13:56:21

  Modified:    src/java/org/apache/mailet Tag: branch_2_1_fcs
                        MailAddress.java
  Log:
  Fixed boundary conditions.  Thanks to Andre Schild for identifying the problem.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.4.1   +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.8
  retrieving revision 1.8.4.1
  diff -u -r1.8 -r1.8.4.1
  --- MailAddress.java  19 Aug 2002 18:57:08 -0000      1.8
  +++ MailAddress.java  26 Feb 2003 21:56:21 -0000      1.8.4.1
  @@ -240,7 +240,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);
  @@ -271,7 +271,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);
  @@ -293,7 +293,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