DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24516>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24516

excessive input and javascript 'do' keyword

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|excessive input issue and   |excessive input and
                   |javascript tag extensibility|javascript 'do' keyword



------- Additional Comments From [EMAIL PROTECTED]  2003-11-07 22:11 -------
I'm sorry -- splitting off the extensibility as a second enhancement report.

Yes -- do is a reserved word.  Skipping "do" isn't necessarily easy -- the code
in question (minor spacing alteration to get it to fit):

if (c <= 'z') {
  if (i == 0) {
    return c + input.substring(pos, input.length());
  } else if (i == input.length()) {
    return input.substring(0, pos) + c;
  } else {
    return input.substring(0, pos) + c + input.substring(pos, input.length()-1);
  }
} else {
  input = replaceChar(input, pos, 'a');
}

The issue with just checking for "c == 'o' && input.charAt(pos-1) == 'd'" is
that method getNextVar(String input) makes no checks as to the length of String
input.  What happens if someone decides to call getNextVar( "a" )?

I am attaching the proposed (and tested through generated code review and
validation returning the appropriate errors in multiple cases) refactored
getNextVar.

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

Reply via email to