RFR: 6201035: Undefined behavior of MatteBorder Ctors [v4]

Sergey Bylokhov serb at openjdk.org
Sat Oct 29 21:30:27 UTC 2022


On Fri, 28 Oct 2022 16:48:19 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review fix
>
> src/java.desktop/share/classes/javax/swing/border/AbstractBorder.java line 91:
> 
>> 89:      *         is {@code null}
>> 90:      */
>> 91:     public Insets getBorderInsets(Component c, Insets insets) {
> 
> Should the specification be clarified here? The method `getBorderInsets(Component c)` above says the fields of the returned `Insets` object are set to 0. The implementation of `getBorderInsets(Component c, Insets insets)` sets the fields of `Insets` to zero … because it has no other insets.
> 
> Should the specification state that this *default implementation* sets the fields of the `Insets` object to zero?

Did we cover all the subclasses?

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

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



More information about the client-libs-dev mailing list