This rule is defined by the following XPath expression:
//MethodDeclaration [ (./ResultType/Type[@Array='true']) and (./Block/BlockStatement/Statement/ReturnStatement/Expression/PrimaryExpression/PrimaryPrefix/Literal/NullLiteral) ]
Example:
public class Example { // Not a good idea... public int []badBehavior() { // ... return null; } // Good behavior public String[] bonnePratique() { //... return new String[0]; } }