RFR: 8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException [v6]

Kevin Rushforth kcr at openjdk.java.net
Thu Jul 2 23:42:13 UTC 2020


On Tue, 30 Jun 2020 23:14:52 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8176270: Adding ChangeListener to TextField.selectedTextProperty causes StringOutOfBoundsException
>>   
>>   Move replaceSelectionAtEndWithListener test to general test class.
>>   Add a more general test for selection/text properties and replace/undo/redo operations.
>
> Changing from using bindings to using listeners seems reasonable as long as there can't be a memory leak as a result
> (it should be fine).
> As I note inline below, I think the clamping is still wrong. Maybe you can't ever hit a case where it matters now, but
> it should still be fixed.

I need to do some more testing, but this looks like the right approach.

This fix might be a candidate for JavaFX 15, so I recommend to _not_ merge the master branch. If I don't spot anything
of concern during the review, then I will ask you to retarget your PR to the `jfx15` branch.

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

PR: https://git.openjdk.java.net/jfx/pull/138


More information about the openjfx-dev mailing list