On Mon, 22 Dec 2025 22:05:58 GMT, Andy Goryachev <[email protected]> wrote:
>> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/RichTextModel.java
>> line 94:
>>
>>> 92: * @since 26
>>> 93: */
>>> 94: protected RichParagraph.Builder buildParagraph(int index) {
>>
>> The name `buildParagraph` implies that this method build something, but it
>> actually returns a builder. Perhaps `paragraphBuilder` would be a better
>> method name?
>
> This method indeed builds the paragraph, but instead of returning the
> paragraph itself, it returns the builder with the data - so a custom model
> can override it to apply post-processing, since the RichParagraph itself is
> immutable.
But it doesn't call the build method. The caller does (see the getParagraph
method above this one). So the method seems misnamed to me.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1966#discussion_r2641394061