On Fri, 10 Jul 2026 12:41:18 GMT, Kevin Rushforth <[email protected]> wrote:
>> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/FileListFormatHandler.java
>> line 68:
>>
>>> 66: @Override
>>> 67: public StyledInput createStyledInput(Object input,
>>> StyleAttributeMap attr) throws IOException {
>>> 68: List<File> files = (List<File>)input;
>>
>> This is an example of what I mentioned in the superclass method. This class
>> should provide docs and at least add an `@throws ClassCastException` (if
>> that's what we decide is the cleanest behavior, else document the behavior
>> you want and change the impl to check for instanceof and implement that
>> behavior).
>
> The superclass now says that a `ClassCastException` is thrown if the the
> input data type is not supported. Do you think it is worth adding a sentence
> to this method saying what type is supported? Maybe something like this?
>
> Suggestion:
>
> /**
> * {@inheritDoc}
> *
> * <p>The type of {@code input} must be {@code List<File>}.
> */
> @Override
> public StyledInput createStyledInput(Object input, StyleAttributeMap
> attr) throws IOException {
> List<File> files = (List<File>)input;
I think the base class description should be good enough - it says
> @throws ClassCastException if the input data type is not supported by the
> **handler**
or do we need a separate and duplicate javadoc? or, is there a way to append
to the base class javadoc?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3560055497