You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/10/09 22:23:04 UTC

[GitHub] [hudi] vinothchandar commented on a change in pull request #2158: [MINOR]Optimization for Option

vinothchandar commented on a change in pull request #2158:
URL: https://github.com/apache/hudi/pull/2158#discussion_r502687707



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/Option.java
##########
@@ -98,6 +98,9 @@ public void ifPresent(Consumer<? super T> consumer) {
   }
 
   public <U> Option<U> map(Function<? super T, ? extends U> mapper) {
+    if (null == mapper) {
+      throw new NullPointerException("Expected a non-null value. Got null");

Review comment:
       let's make this more contextual?
   
   `mapper is expected to be non-null`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org