You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by no...@apache.org on 2011/11/02 12:30:28 UTC
svn commit: r1196545 -
/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java
Author: noelgrandin
Date: Wed Nov 2 11:30:28 2011
New Revision: 1196545
URL: http://svn.apache.org/viewvc?rev=1196545&view=rev
Log:
(PIVOT-814) TextArea#getText throws IndexOutOfBoundsException when called from TextChanged method under setText
Modified:
pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java?rev=1196545&r1=1196544&r2=1196545&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java Wed Nov 2 11:30:28 2011
@@ -626,6 +626,9 @@ public class TextArea extends Component
}
int count = endIndex - beginIndex;
+ if (count == 0) {
+ return "";
+ }
StringBuilder textBuilder = new StringBuilder(count);
// Get paragraph and character offset at beginIndex