scolebourne    2004/08/28 02:21:05

  Modified:    lang/src/java/org/apache/commons/lang Tokenizer.java
  Log:
  Rename nd to end
  
  Revision  Changes    Path
  1.8       +21 -21    
jakarta-commons/lang/src/java/org/apache/commons/lang/Tokenizer.java
  
  Index: Tokenizer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/Tokenizer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Tokenizer.java    28 Aug 2004 09:14:21 -0000      1.7
  +++ Tokenizer.java    28 Aug 2004 09:21:05 -0000      1.8
  @@ -629,12 +629,12 @@
           // Loop until we've found the end of the quoted
           // string or the end of the input
           int cbufcnt = 0;
  -        int nd = start + 1;
  +        int end = start + 1;
           boolean done = false;
           boolean quoting = true;
           int len = chars.length;
   
  -        while (nd < len && !done) {
  +        while (end < len && !done) {
               // Quoting mode can occur several times throughout
               // a given string, so must switch between quoting
               // and non-quoting until we encounter a non-quoted
  @@ -645,21 +645,21 @@
                   // followed by a second quote.  If so, then we need
                   // to actually put the quote character into the token
                   // rather than end the token.
  -                if (quote.isMatch(chars[nd]) &&
  -                        nd + 1 < len &&
  -                        chars[nd + 1] == chars[nd]) {
  -                    cbuf[cbufcnt++] = chars[nd];
  -                    nd++;
  +                if (quote.isMatch(chars[end]) &&
  +                        end + 1 < len &&
  +                        chars[end + 1] == chars[end]) {
  +                    cbuf[cbufcnt++] = chars[end];
  +                    end++;
                   }
                   // End the quoting if we get to this condition
  -                else if (quote.isMatch(chars[nd])) {
  +                else if (quote.isMatch(chars[end])) {
                       quoting = false;
                   }
                   // Otherwise, just put the character into the token
                   else {
  -                    cbuf[cbufcnt++] = chars[nd];
  +                    cbuf[cbufcnt++] = chars[end];
                   }
  -                nd++;
  +                end++;
               }
               // If we're not in quoting mode, if we encounter
               // a delimiter, the token is ended.  If we encounter
  @@ -667,22 +667,22 @@
               // the character
               else {
                   // If we're
  -                if (delim.isMatch(chars[nd])) {
  +                if (delim.isMatch(chars[end])) {
                       done = true;
                   } else {
  -                    if (quote.isMatch(chars[nd])) {
  +                    if (quote.isMatch(chars[end])) {
                           quoting = true;
                       } else {
  -                        cbuf[cbufcnt++] = chars[nd];
  +                        cbuf[cbufcnt++] = chars[end];
                       }
  -                    nd++;
  +                    end++;
                   }
               }
           }
   
           token.append(cbuf, 0, cbufcnt);
   
  -        return nd + 1;
  +        return end + 1;
       }
   
       /**
  @@ -698,14 +698,14 @@
           int len = chars.length;
           // Skip ahead until we get to a delimiter character, or
           // the end of the input
  -        int nd = start + 1;
  -        while (nd < len && !delim.isMatch(chars[nd])) {
  -            nd++;
  +        int end = start + 1;
  +        while (end < len && !delim.isMatch(chars[end])) {
  +            end++;
           }
   
  -        token.append(chars, start, Math.min(nd, len) - start);
  +        token.append(chars, start, Math.min(end, len) - start);
   
  -        return nd + 1;
  +        return end + 1;
       }
   
       /**
  
  
  

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

Reply via email to