changeset 27063 | 964ad56e8d1c |
parent 25859 | 3317bb8137f4 |
child 30462 | 507bcb03c954 |
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java Sun Oct 05 10:23:13 2014 -0700 +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java Tue Oct 07 18:03:58 2014 +0400 @@ -854,7 +854,7 @@ int direction, Position.Bias[] biasRet) throws BadLocationException { - if (pos < -1) { + if (pos < -1 || pos > getDocument().getLength()) { throw new BadLocationException("invalid position", pos); } return Utilities.getNextVisualPositionFrom(