On Thu, 13 Nov 2025 13:14:04 GMT, Alexey Ivanov <[email protected]> wrote:

> What's fixed is the behaviour of this constructor now aligns with that of the 
> constructor with more arguments, specifically no NullPointerException is 
> thrown if null color is passed. Now, both constructors behave consistently. 

But they cannot behave consistently. The constructor you mentioned has 
parameters such as highlightInner and highlightOuter, which may be null, and 
the corresponding getters specify this behavior. However, the constructor 
updated in this patch takes a different parameter. The color from which, 
according to the specification, colors like highlightInner and highlightOuter 
should be derived. If the provided color is null, it is impossible to derive 
these values, and an exception was originally thrown. Now, instead of throwing 
an exception when the specification cannot be followed, the implementation 
silently falls back to unspecified logic, which contradicts the spec.

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

PR Comment: https://git.openjdk.org/jdk/pull/27949#issuecomment-3528891157

Reply via email to