|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD | |||||||
java.lang.Objectorg.codenarc.rule.AbstractAstVisitorRule
groovy.org.codenarc.rule.groovyism.AssignCollectionSortRule
class AssignCollectionSortRule extends AbstractAstVisitorRule
The Collections.sort() method mutates the list and returns the list as a value. If you are assigning the result of sort() to a variable, then you probably don't realize that you're also modifying the original list as well. This is frequently the cause of subtle bugs.
| Property Summary | |
|---|---|
Class |
astVisitorClass
|
String |
name
|
int |
priority
|
| Property Detail |
|---|
Class astVisitorClass
String name
int priority
Groovy Documentation