Merge branch 'master' of https://github.com/dev-chirag/tutorials
This commit is contained in:
commit
af18209504
@ -8,11 +8,7 @@ public class UsingOptional {
|
|||||||
|
|
||||||
String response = doSomething(processed);
|
String response = doSomething(processed);
|
||||||
|
|
||||||
if (response == null) {
|
return Optional.ofNullable(response);
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
return Optional.of(response);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String doSomething(boolean processed) {
|
private String doSomething(boolean processed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user