On Tue, 1 Oct 2024 23:04:40 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

> > There might be a very narrow use case (like debugging) when developer might 
> > need to extend to supply a custom `toString()` or some other method.
> > From a high level design standpoint, I do agree with making these classes 
> > final.
> 
> Maybe, but that's not a sufficient reason to allow subclassing, as the same 
> could be said for all cases of encapsuluation and inheritance control. 
> Alternatives are:
> 
> 1. Use the debugger to mark objects
> 2. Use a tool to change method definitions at runtime
> 3. Download OpenJFX and build it locally with the required changes

4. Copy/paste class without changing its package into your code and modify it 
(only works when not running with modules) -- it's so much faster to test 
changes this way than building JFX.

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

PR Comment: https://git.openjdk.org/jfx/pull/1587#issuecomment-2397194776

Reply via email to