BAEL-2122 Optional or else throw (#5047)
* Throw and throws in Java * BAEL-2122 | throw exception in optional * BAEL-2122 | optional orelsethrow
This commit is contained in:
@@ -8,7 +8,7 @@ public class PersonRepository {
|
||||
|
||||
@Nullable
|
||||
public String findNameById(String id) {
|
||||
return id == null ? null : "example-name";
|
||||
return id == null ? null : "Name";
|
||||
}
|
||||
|
||||
public List<String> findAll() throws SQLException {
|
||||
|
||||
Reference in New Issue
Block a user