RFR: 8341670: [Text, TextFlow] Public API for Text Layout Info [v16]

Andy Goryachev angorya at openjdk.org
Fri May 2 17:20:57 UTC 2025


On Thu, 1 May 2025 18:58:47 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> We've got https://bugs.openjdk.org/browse/JDK-8341438 and a possibility of a regression if we change the existing methods.
>> 
>> I would very much like to get your thoughts on this.
>
> I also would like to hear thoughts about compatibility concerns around fixing [JDK-8341438](https://bugs.openjdk.org/browse/JDK-8341438).
> 
> If we are not going to fix it in the same release (JavaFX 25) as this Text LayoutInfo enhancement, I think we need a NOTE in the javadoc to clarify this difference.

Good point!  I think we should do the following in https://bugs.openjdk.org/browse/JDK-8341438 (after this PR gets integrated):

- deprecate the existing (buggy) methods, but keep them for compatibility
- add new methods, named `getX*Shape()`, with additional arguments where needed
- update javadoc for the existing methods, explaining the problem (possibly)

This will fix the issue and avoid breaking existing applications which applied workarounds.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r2071919907


More information about the openjfx-dev mailing list