Groovy Documentation

groovy.org.codenarc.rule.basic
[Groovy] Class IntegerGetIntegerRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.basic.IntegerGetIntegerRule

class IntegerGetIntegerRule
extends AbstractAstVisitorRule

This rule catches usages of java.lang.Integer.getInteger(String, ...) which reads an Integer from the System properties. It is often mistakenly used to attempt to read user input or parse a String into an Integer. It is a poor piece of API to use; replace it with System.properties['prop'].

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