RFR: JDK-8297412: Remove easy warnings in javafx.fxml, javafx.media, javafx.swing, javafx.swt and javafx.web [v5]

Kevin Rushforth kcr at openjdk.org
Tue Nov 29 22:31:09 UTC 2022


On Tue, 29 Nov 2022 21:47:05 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> I see that this change has been reverted. That's good.
>> 
>> FWIW, I disagree with the original premise of removing it. The subclass shouldn't have to know or care that the superclass method is empty or not.
>> 
>> I looked through the current version, and no longer have any concerns about this PR. I'll let others formally review.
>
> Although there are many ways to implement this kind of inheritance, I do think that what I did here was also a valid solution.  The parent class was already `abstract` -- all I did was to make the `processEndElement` abstract instead of empty, forcing the subtypes to think about it and implement it.  Calling `super` is then no longer allowed.  I did not remove `super` because I knew it was empty, I removed it because it was now `abstract`.

> The parent class was already abstract -- all I did was to make the processEndElement abstract instead of empty, forcing the subtypes to think about it and implement it ...
>  I did not remove super because I knew it was empty, I removed it because it was now abstract.

OK, that's a fair point then. And given that, I wouldn't necessarily be opposed to doing something like this as part of a more targeted cleanup rather than a general "remove warnings" sort of cleanup.

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

PR: https://git.openjdk.org/jfx/pull/958


More information about the openjfx-dev mailing list