Index: /modules/swing/src/test/api/java/common/javax/swing/text/ParagraphViewTest.java =================================================================== --- /modules/swing/src/test/api/java/common/javax/swing/text/ParagraphViewTest.java (revision 453491) +++ /modules/swing/src/test/api/java/common/javax/swing/text/ParagraphViewTest.java (working copy) @@ -34,6 +34,7 @@ import javax.swing.text.Position.Bias; import javax.swing.text.ViewTestHelpers.ChildView; import javax.swing.text.ViewTestHelpers.ChildrenFactory; +import javax.swing.text.html.HTMLDocument; public class ParagraphViewTest extends BasicSwingTestCase { private static final int HEIGHT = 30; @@ -1019,6 +1020,19 @@ assertSame(view.getAttributes(), row.getAttributes()); } + // regression for HARMONY-1745 + public void testGetView() { + HTMLDocument doc = new HTMLDocument(); + Element localElement = doc.getDefaultRootElement(); + ParagraphView pv = new ParagraphView(localElement); + View v = null; + try { + v = pv.getView(0); + } catch (ArrayIndexOutOfBoundsException e) { + fail("Got unexpected ArrayIndexOutOfBoundsException : " + e); + } + } + private static AttributeSet getInsetsAttributeSet() { MutableAttributeSet attrs = new SimpleAttributeSet(); StyleConstants.setSpaceAbove(attrs, 9.53f);