On Tue, 17 Dec 2024 18:01:57 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> use exhaustive switch pattern > > modules/javafx.graphics/src/main/java/com/sun/javafx/tk/Toolkit.java line 597: > >> 595: >> 596: public Object getPaint(Paint paint) { >> 597: return switch (paint) { > > standard warning: not equivalent change (in the case of null `paint`). > it's ok in this case, since it looks like this method is never called with a > null argument thanks to guards like this replicated across the code base: > > > peer.setFillPaint(getFill() == null ? null : tk.getPaint(getFill())); > > > would it have been easier to allow null argument and return null from > `getPaint()` instead? `null` is not a valid argument for this method, and has never been. `acc_getPlatformPaint()` previously asserted that the return value is not `null`. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1665#discussion_r1888999112