Groovy Documentation

groovy.org.codenarc.rule.unnecessary
[Groovy] Class UnnecessaryLongInstantiationRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.unnecessary.UnnecessaryLongInstantiationRule

class UnnecessaryLongInstantiationRule
extends AbstractAstVisitorRule

It is unnecessary to instantiate Long objects. Instead just use the literal with the 'L' identifier to force the type, such as 8L or 42L.

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