On Tue, 1 Oct 2024 16:06:56 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Andy Goryachev has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 26 commits: >> >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - whitespace >> - review comments >> - file operations >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - review comments >> - fixed directories >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - hide impl. detail >> - ... and 16 more: https://git.openjdk.org/jfx/compare/5428f267...aaa361c9 > > modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/RichTextArea.java > line 1166: > >> 1164: * This method does nothing if the model or the caret position is >> {@code null}. >> 1165: * The default implementation will attempt to copy the information >> first, then delete the selected text. >> 1166: * Any failures, such as the control being not editable, or out of >> memory condition, will be silently ignored. > > I see what you are getting at, but I might recommend separating normal state > conditions, such as "the control not being editable" from an error condition, > such as OOM. > > Btw, the implementation of `cut` currently throws an exception if not > editable, so needs to be fixed. no, it does not - RichTextAreaBehavior.cut() L1232 } catch(Exception | OutOfMemoryError e) { RichUtils.provideErrorFeedback(control, e); } one may question whether we should be handling OOME here and providing a feedback (which currently dumps the stack trace to stderr which is not the best idea). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1783292953