How does that fix the issue? Remove the (void) parameter and it's valid Java code which behaves the same.
The better advice would be "use analysis tools and don't ignore compiler warnings". It's their job to catch these kinds of errors, or at least make the programmer aware of code areas which could contain unwanted behavior.
View all comments
4
u/Sollder1_ Feb 03 '22
Should have used Java