Move optional to java-8-core (#5105)
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
package com.baeldung.throwsexception;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
public class PersonRepository {
|
||||
|
||||
@Nullable
|
||||
public String findNameById(String id) {
|
||||
return id == null ? null : "Name";
|
||||
}
|
||||
|
||||
public List<String> findAll() throws SQLException {
|
||||
throw new SQLException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user