Synopsis: | Avoid really long methods |
Language: | Java |
Severity Level: | 2 |
Category: | CodeSize |
Description: |
Violations of this rule usually indicate that the method is doing
too much (containing more than 100 statements). Try to reduce the method size by creating helper methods and removing any copy/pasted code. public class Foo { public void doSomething() { System.out.println("Hello world!"); System.out.println("Hello world!"); // 98 copies omitted for brevity. } } |
Literature References: |
Google Android Guidelines |