RFR: JDK-6229853: BasicTextAreaUI:create incompletely documents the possible returned View types [v4]

Alexey Ivanov aivanov at openjdk.org
Wed Sep 28 12:32:26 UTC 2022


On Wed, 28 Sep 2022 12:11:31 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> API specification says about BasicTextAreaUI.create "Returns a WrappedPlainView or PlainView". 
>> But for [bidi](https://github.com/openjdk/jdk/blob/d14e96d9701dae951aa365029f58afb6687a646a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java#L168) text, this method returns BoxView and other views , so the documentation needs to be updated.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   javadoc fix

Looks good if our decision is not document the types of views returned.

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java line 86:

> 84: 
> 85:     /**
> 86:      * Creates a view based on an element.

Should we use the wording from `BasicTextUI` for consistency?

Suggestion:

     * Creates a view for an element.


The description in [`ViewFactory.create`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/ViewFactory.html#create(javax.swing.text.Element)) is more detailed, a short sentence as above is enough for `TextUI`.

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

Marked as reviewed by aivanov (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10376



More information about the client-libs-dev mailing list