Groovy Documentation

groovy.org.codenarc.rule.design
[Groovy] Class ReturnsNullInsteadOfEmptyCollectionRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.design.ReturnsNullInsteadOfEmptyCollectionRule

class ReturnsNullInsteadOfEmptyCollectionRule
extends AbstractAstVisitorRule

This rule detects when null is returned from a method that might return a collection. Instead of null, return a zero length array.

Authors:
Hamlet D'Arcy


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation