示例

public class ClassA {{
public int test (int i)
{
if (i == 0) {
return 1;
}
else {
return 0;
}
}
}

解决方案
重新考虑代码结构,只留下一个 return 语句