If I want to return Result.ok and enter null as a value, for certain methods such as isOk, ifOk and similar, a nullPointerException is obtained.
java.lang.NullPointerException: null
at java.base/java.util.Objects.requireNonNull(Objects.java:233) ~[na:na]
at java.base/java.util.Optional.of(Optional.java:113) ~[na:na]
at com.hubspot.algebra.Results.lambda$getOk$3(Results.java:46) ~[algebra-1.5.jar:1.5]
at com.hubspot.algebra.Results$Ok.match(Results.java:104) ~[algebra-1.5.jar:1.5]
at com.hubspot.algebra.Results.getOk(Results.java:45) ~[algebra-1.5.jar:1.5]
at com.hubspot.algebra.Result.isOk(Result.java:32) ~[algebra-1.5.jar:1.5]
If I want to return Result.ok and enter null as a value, for certain methods such as isOk, ifOk and similar, a nullPointerException is obtained.
java.lang.NullPointerException: null at java.base/java.util.Objects.requireNonNull(Objects.java:233) ~[na:na] at java.base/java.util.Optional.of(Optional.java:113) ~[na:na] at com.hubspot.algebra.Results.lambda$getOk$3(Results.java:46) ~[algebra-1.5.jar:1.5] at com.hubspot.algebra.Results$Ok.match(Results.java:104) ~[algebra-1.5.jar:1.5] at com.hubspot.algebra.Results.getOk(Results.java:45) ~[algebra-1.5.jar:1.5] at com.hubspot.algebra.Result.isOk(Result.java:32) ~[algebra-1.5.jar:1.5]