Synopsis: | Consider simply returning values instead of storing it in a local variable |
Language: | Java |
Severity Level: | 3 |
Category: | Design |
Description: |
Avoid unnecessarily creating local variablespublic class Foo { public int foo() { int x = doSomething(); return x; // instead, just 'return doSomething();' } } |