On Mon, 22 Dec 2025 22:40:32 GMT, Andy Goryachev <[email protected]> wrote:

>> Yes, but unless I'm missing something, RParagraph.buildParagraph is now 
>> similarly misnamed. It returns the builder to the caller who now has the 
>> responsibility of calling `build`.
>
> `RParagraph` is an internal class.

Sure, but that wasn't my point. I don't see any indication that the method 
currently called `buildParagraph` builds a paragraph. What it does is returns a 
paragraph builder. Great, but in that case, the method is misnamed.

So, either I'm missing something (possible, but I've looked at it pretty 
closely by now) or the name of this method should be changed (you'll also need 
to fix the first sentence of the docs).

What I see is this:

`RichTextModel:: buildParagraph` returns a builder. The only caller of that 
method is getParagraph, which then calls build and it is _that_ call to build, 
not the call to this method that builds the paragraph:


        RichParagraph.Builder b = buildParagraph(index);     <-- this returns a 
builder
        return b.build();        <-- this is the build
    }

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1966#discussion_r2641469818

Reply via email to