pitest
pitest copied to clipboard
Copy of array(collections) to protect data from changes
<mutation unstable="false">
<sourceFile>JavadocMethodCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck</mutatedClass>
<mutatedMethod>setAccessModifiers</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator</mutator>
<description>replaced call to java/util/Arrays::copyOf with argument</description>
<lineContent>Arrays.copyOf(accessModifiers, accessModifiers.length);</lineContent>
</mutation>
It is possible that the removal of Arrays.copyOf will not make any issue in the code. but still, it will protect data from changes.
In recent world, people do care about data protection more than memory, so this pattern is frequent and better to not raise flag on it. Extra config is completely ok, to let reconcile team with different vision on what is good.