[Rev 01] RFR: 8235772: Remove use of deprecated finalize method from PiscesRenderer and AbstractSurface
arapte at openjdk.java.net
Fri Feb 7 12:34:46 UTC 2020
On Wed, 5 Feb 2020 22:42:19 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> The pull request has been updated with a new target base due to a merge or a rebase.
> modules/javafx.graphics/src/main/java/com/sun/pisces/JavaSurface.java line 46:
>> 45: initialize(dataType, width, height);
>> 46: addDisposerRecord();
>> 47: }
> Should this be called from the superclass instead? It works as-is, but if there were ever another subclass added, it would have to be replicated there as well.
`AbstractSurface.nativePtr` is needed to create the `AbstractSurfaceDisposerRecord`.
It is created and set by the native method `initialize(dataType, width, height);` invoked at line 45 in the `JavaSurface` constructor.
It is the reason `addDisposerRecord()` is needed here.
More information about the openjfx-dev