r/JavaFX • • Apr 10 '24

Help Warning possible 'this' escape

When building my JavaFX project I run into this warning a lot

warning: [this-escape] possible 'this' escape before subclass is fully initialized

Especially when i'm trying to setup the initial listeners and bindings associated with an object. Is there a best practice to avoid this? or Is it just a necessary evil of JavaFX since the base implementation doesn't provide a post construct type method to run code after the class has been initialized.

2 Upvotes

24 comments sorted by

View all comments

Show parent comment

1

u/colindj1120 Apr 10 '24

Yes its a custom framework I'm creating