Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-20 Thread Kevin Rushforth
On Wed, 18 Dec 2024 18:03:59 GMT, Andy Goryachev wrote: >> 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 har

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-20 Thread Kevin Rushforth
On Sat, 14 Dec 2024 17:16:20 GMT, Michael Strauß wrote: >> The `Paint` and `Material` classes can't be extended by user code, because >> their implementations require special support in internal JavaFX code. The >> classes should be sealed. > > Michael Strauß has updated the pull request increm

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-18 Thread Andy Goryachev
On Wed, 18 Dec 2024 17:55:12 GMT, Michael Strauß wrote: >> 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.getPai

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-18 Thread Andy Goryachev
On Sat, 14 Dec 2024 17:16:20 GMT, Michael Strauß wrote: >> The `Paint` and `Material` classes can't be extended by user code, because >> their implementations require special support in internal JavaFX code. The >> classes should be sealed. > > Michael Strauß has updated the pull request increm

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-18 Thread Michael Strauß
On Tue, 17 Dec 2024 18:18:00 GMT, Andy Goryachev 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

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-17 Thread Andy Goryachev
On Tue, 17 Dec 2024 18:13:28 GMT, Michael Strauß wrote: >> 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 (i

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-17 Thread Michael Strauß
On Tue, 17 Dec 2024 18:01:57 GMT, Andy Goryachev 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: >

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-17 Thread Andy Goryachev
On Sat, 14 Dec 2024 17:16:20 GMT, Michael Strauß wrote: >> The `Paint` and `Material` classes can't be extended by user code, because >> their implementations require special support in internal JavaFX code. The >> classes should be sealed. > > Michael Strauß has updated the pull request increm

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-17 Thread Nir Lisker
On Sat, 14 Dec 2024 17:16:20 GMT, Michael Strauß wrote: >> The `Paint` and `Material` classes can't be extended by user code, because >> their implementations require special support in internal JavaFX code. The >> classes should be sealed. > > Michael Strauß has updated the pull request increm

Re: RFR: 8346227: Seal Paint and Material [v2]

2024-12-14 Thread Michael Strauß
> The `Paint` and `Material` classes can't be extended by user code, because > their implementations require special support in internal JavaFX code. The > classes should be sealed. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: