On Thu, 9 Jul 2026 18:36:05 GMT, Kevin Rushforth <[email protected]> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   demos
>
> 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;

> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/RichTextModel.java
>  line 238:
> 
>> 236: 
>> 237:     @Override
>> 238:     public StyleAttributeMap getStyleAttributeMap(StyleResolver 
>> resolver, TextPos pos, boolean forInsert) {
> 
> Check whether `@since 27` inherits

Not an issue.

> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/RichTextModel.java
>  line 427:
> 
>> 425:          * @since 27
>> 426:          */
>> 427:         public StyleAttributeMap getStyleAttributeMap(int charIndex, 
>> boolean leading, boolean forInsert) {
> 
> This is in a private class. It probably shouldn't have any javadoc, much less 
> an `@since`

OK to leave the javadoc. Thanks for getting rid of the `@since`

> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/SimpleViewOnlyStyledModel.java
>  line 330:
> 
>> 328: 
>> 329:     @Override
>> 330:     public StyleAttributeMap getStyleAttributeMap(StyleResolver r, 
>> TextPos pos, boolean forInsert) {
> 
> Check `@since 27`

No changes needed.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3558946959
PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3559021380
PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3559024540
PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3559025655

Reply via email to