[java] Fix OnlyOneReturn code example

This commit is contained in:
Jan-Lukas Else
2020-08-06 14:39:40 +02:00
committed by GitHub
parent b01dc8371b
commit 68656baee5

View File

@ -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
}