diff options
author | Robert Schuster <theBohemian@gmx.net> | 2006-03-05 22:44:35 +0000 |
---|---|---|
committer | Robert Schuster <theBohemian@gmx.net> | 2006-03-05 22:44:35 +0000 |
commit | 55af66a46a67ba3a88feaa2e2c4306b40e52b6fb (patch) | |
tree | 2e25d5f92e5b8ae425030775f4af01a029e729d0 | |
parent | 1efb8de05f013c52ccef376e93e93a44164cf508 (diff) | |
download | classpath-55af66a46a67ba3a88feaa2e2c4306b40e52b6fb.tar.gz |
2006-03-05 Robert Schuster <robertschuster@fsfe.org>
* javax/swing/text/GapContent.java:
(insertString): Throw exception when argument is below
zero.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | javax/swing/text/GapContent.java | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2006-03-05 Robert Schuster <robertschuster@fsfe.org> + + * javax/swing/text/GapContent.java: + (insertString): Throw exception when argument is below + zero. + 2006-03-05 David Gilbert <david.gilbert@object-refinery.com> * javax/swing/plaf/metal/MetalComboBoxButton.java diff --git a/javax/swing/text/GapContent.java b/javax/swing/text/GapContent.java index f5ab7f2b2..28d1d6ee0 100644 --- a/javax/swing/text/GapContent.java +++ b/javax/swing/text/GapContent.java @@ -347,8 +347,12 @@ public class GapContent int length = length(); int strLen = str.length(); + if (where < 0) + throw new BadLocationException("The where argument cannot be smaller" + + " than the zero", where); + if (where >= length) - throw new BadLocationException("the where argument cannot be greater" + throw new BadLocationException("The where argument cannot be greater" + " than the content length", where); replace(where, 0, str.toCharArray(), strLen); |