BAEL2489:Avoid check for null statements in Java (#6647)

* BAEL2489 - Avoid check for null statement in Java

* BAEL2489 Avoid check for null statement in Java

* BAEL2489 Avoid check for null statement in Java

* BAEL2489 Avoid check for null statement in Java

* BAEL2489 Avoid check for null statement in Java

* BAEL2489 Avoid check for null statement in Java - Removing unused pom changes

* BAEL2489 Avoid check for null statement in Java - Removing unused pom changes

* Delete pom.xml

Removing unused changes in core-java

* BAEL2489 Avoid check for null statement in Java - Removing unused pom changes

* BAEL2489 Avoid check for null statement in Java - adding ofnullable to Optional example
This commit is contained in:
dev-chirag 2019-04-05 09:43:51 +05:30 committed by KevinGilmore
parent a7eb7bf8e0
commit 3d31d07b46
1 changed files with 1 additions and 5 deletions

View File

@ -8,11 +8,7 @@ public class UsingOptional {
String response = doSomething(processed);
if (response == null) {
return Optional.empty();
}
return Optional.of(response);
return Optional.ofNullable(response);
}
private String doSomething(boolean processed) {