On Tue, 17 Dec 2024 18:18:00 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> `null` is not a valid argument for this method, and has never been. >> `acc_getPlatformPaint()` previously asserted that the return value is not >> `null`. > > this is not what I am asking though: in more than one place we have _callers_ > like this > > peer.setFillPaint(getFill() == null ? null : tk.getPaint(getFill())); > > > it could be changed to > > peer.setFillPaint(tk.getPaint(getFill())); Yes, that would make the callsite a bit easier. However, from an API perspective, I think it's not the best approach to handle nulls in the toolkit layer. A system that channels nulls thorugh various layers tends to become harder to reason about over time. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1665#discussion_r1890631899