Stop implementing clone() methods

Hi Devs,

I’d like that we vote to stop implementing clone() methods in our java classes. This is rule java:S2975 from SonarQube and I feel it makes sense.

The solution we should use is either using a constructor or a factory/copy method.

For existing issues, we should try to progressively deprecate the existing clone() method where we can and where it doesn’t break backward compatibility, as a best effort.

I’m also proposing that we mark the existing issues in SonarQube as “Accept”.

Here’s my +1

Please cast your votes.

Thanks

+1 thanks

+1

Thanks,
Marius

+0