[java] Fix OnlyOneReturn code example
This commit is contained in:
@ -1500,7 +1500,7 @@ A method should have only one exit point, and that should be the last statement
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class OneReturnOnly1 {
|
||||
public void foo(int x) {
|
||||
public String foo(int x) {
|
||||
if (x > 0) {
|
||||
return "hey"; // first exit
|
||||
}
|
||||
|
Reference in New Issue
Block a user