On Tue, 9 Mar 2021 21:12:08 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> BasicTextUI: installDefaults javadoc specifies only font, foreground and >> background properties are set if their current value is either null or a >> UIResource >> and other properties are set if the current value is null >> but in reality all properties such as font, foreground, background, caret >> color, selection color, selected text color, disabled text color, and border >> color are set if their current value is either null or a UIResource. >> Fixed the javadoc to specify the same. > > src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java line > 307: > >> 305: * background, caret color, selection color, selected text color, >> 306: * disabled text color, and border color. All properties are set >> 307: * if their current value is either null or a UIResource. > > Suggestion: > > * disabled text color, and border color. Each property is set, > * if its current value is either null or a UIResource. > > I think this conveys the behavior better. Each property is checked > separately, independently from other properties. I'm not an expert in English but i think comma after set is not needed. ------------- PR: https://git.openjdk.java.net/jdk/pull/2888