On Tue, 22 Apr 2025 22:48:43 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> modules/jfx.incubator.richtext/src/test/java/test/jfx/incubator/scene/control/richtext/RichTextAreaTest.java
>>  line 410:
>> 
>>> 408:         control.setModel(null);
>>> 409:         // on second through, maybe this should return null
>>> 410:         assertEquals(TextPos.ZERO, control.getParagraphEnd(0));
>> 
>> Are you keeping a list of such API questions?
>> 
>> In this case, I would think that asking for a paragraph that is out of range 
>> would throw IOOBE. What does control.getParagraph(N) do when N is out of 
>> range? This method should behave similarly.
>
> good point, let me think about it.

Agree with you - getParagraphEnd() should probably throw an IOOBE in case of a 
null model, or when the index goes beyond what the model supports, similarly to 
getParagraph().

I am going to leave this as is for this PR, and yes, I do keep track of the 
feedback and possible changes.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1677#discussion_r2056678066

Reply via email to