You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/02/15 16:56:01 UTC
svn commit: r1446649 -
/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/TextArea.java
Author: smartini
Date: Fri Feb 15 15:56:01 2013
New Revision: 1446649
URL: http://svn.apache.org/r1446649
Log:
PIVOT-888: the fix
Modified:
pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/TextArea.java
Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/TextArea.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/TextArea.java?rev=1446649&r1=1446648&r2=1446649&view=diff
==============================================================================
--- pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/TextArea.java (original)
+++ pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/TextArea.java Fri Feb 15 15:56:01 2013
@@ -684,8 +684,14 @@ public class TextArea extends Component
throw new IllegalArgumentException();
}
+ if (text.length() > maximumLength) {
+ throw new IllegalArgumentException("Text length is greater than maximum length.");
+ }
+
try {
- setText(new StringReader(text));
+ if (!text.equals(this.getText())) {
+ setText(new StringReader(text));
+ }
} catch (IOException exception) {
throw new RuntimeException(exception);
}