Synopsis: | Avoid really long parameter lists |
Language: | Java |
Severity Level: | 2 |
Category: | CodeSize |
Description: |
Long parameter lists can indicate that a new object should be created to
wrap the numerous parameters. Basically, try to group the parameters together. This rule triggers if a method has 10 or more parameters.public class Foo { public void addData( int p0, int p1, int p2, int p3, int p4, int p5, int p5, int p6, int p7, int p8, int p9, int p10) { } } } |