On Wed, 7 Oct 2026 23:11:17 GMT, Kevin Rushforth <[email protected]> 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 14 commits: >> >> - Merge branch 'master' into 8388276.import.images >> - Merge branch 'master' into 8388276.import.images >> - spelling >> - Merge branch 'master' into 8388276.import.images >> - copied from swing fx utils >> - Merge branch 'master' into 8388276.import.images >> - images >> - lossless >> - Merge branch 'master' into 8388276.import.images >> - whitespace >> - ... and 4 more: https://git.openjdk.org/jfx/compare/eab83a4b...b4c734c2 > > modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/ImageFormatHandler.java > line 70: > >> 68: @Override >> 69: public StyledInput createStyledInput(Object input, StyleAttributeMap >> attr) throws IOException { >> 70: Image im = (Image)input; > > `RichTextModel` registers an instance of this class as a `DataFormatHandler` > for images. That means it will show up in the list of supported data formats. > If one were to pass an image format to `StyledTextModel.read(StyleResolver, > DataFormat, InputStream)`, it will cause a CCE because input will be a > `String `. This might or might not be a problem in practice given that it is > not an exportable format and thus wouldn't be copied onto the clipboard or > written to a file. not a problem: 1. this is an import handler 2. it will only receive the `Image` input ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2224#discussion_r4233113312
