jstrachan 2002/10/12 05:26:39
Modified: jelly/src/java/org/apache/commons/jelly/impl TextScript.java
Log:
Patched bug where trimming the end of whitespace would leave a trailing whitespace
character
Revision Changes Path
1.9 +6 -6
jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TextScript.java
Index: TextScript.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TextScript.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TextScript.java 25 Jun 2002 19:12:29 -0000 1.8
+++ TextScript.java 12 Oct 2002 12:26:39 -0000 1.9
@@ -116,7 +116,7 @@
*/
public void trimEndWhitespace() {
int index = text.length();
- while (--index > 0) {
+ while (--index >= 0) {
char ch = text.charAt(index);
if (!Character.isWhitespace(ch)) {
break;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>