Class ArrayIsStoredDirectlyRule

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.AstVisitor, JavaVisitor, net.sourceforge.pmd.lang.rule.Rule, net.sourceforge.pmd.properties.PropertySource

    public class ArrayIsStoredDirectlyRule
    extends AbstractJavaRulechainRule
    If a method or constructor receives an array as an argument, the array should be cloned instead of directly stored. This prevents future changes from the user from affecting the original array.