4 ms·
As far as I know `footGunA` can only be a static method and cannot leak `this`. This is perfectly fine as far as I'm concerned.
by DarkNova6 3y ago
As far as I know `footGunA` can only be a static method and cannot leak `this`.
This is perfectly fine as far as I'm concerned.
- usrusr 3y agoI should have checked instead of replying from memory: It's actually footgunB that is refused by the compiler. footgunA is accepted and will even call happily into an overridden implementation from a field initializer in the superclass. That way you can get a method to see a final field null on one call and non-null on the next.