RFR: 8276337: Use override specifier in HeapDumper
Thomas Stuefe
stuefe at openjdk.java.net
Fri Nov 5 15:04:16 UTC 2021
On Fri, 5 Nov 2021 13:02:52 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:
> > In what way is it "safer" ?? What are you trying to guard against?
>
> If you use `override`, you can not forget to update a method signature if you change the method signature in the base class. You can also not by mistake change the method signature in this class without realizing you should change the base class. There is no downside of using `override` that I know of.
In addition to that, its a helpful documentation for the code reader.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6274
More information about the serviceability-dev
mailing list