RFR: 5021949: JSplitPane setEnabled(false) shouldn't be partially functional [v3]

Alexey Ivanov aivanov at openjdk.org
Tue Jun 18 12:25:21 UTC 2024


On Mon, 17 Jun 2024 05:08:29 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> All L&F including Aqua extends BasicSplitPaneUI so it's ok...The existing test iterates through all L&F without any issue..

That is true, yet it is still possible to set a L&F that doesn't extend `BasicSplitPaneUI` and the updated code will throw `ClassCastException`.

I'm sure such a situation is rare, if it exists at all, yet I don't think the public API should have such a limitation: `JSplitPane.setUI` accepts `SplitPaneUI`, so it is valid to pass an object that is not subclass of `BasicSplitPaneUI`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19695#discussion_r1644363798


More information about the client-libs-dev mailing list