Reamer commented on code in PR #4407:
URL: https://github.com/apache/zeppelin/pull/4407#discussion_r923374722


##########
zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewNoteRequest.java:
##########
@@ -16,30 +16,33 @@
  */
 package org.apache.zeppelin.rest.message;
 
-import com.google.gson.Gson;
-
 import java.util.List;
 
-import org.apache.zeppelin.common.JsonSerializable;
-
 /**
  *  NewNoteRequest rest api request message.
  */
-public class NewNoteRequest implements JsonSerializable {
-  private static final Gson GSON = new Gson();
+public class NewNoteRequest {
 
   //TODO(zjffdu) rename it to be notePath instead of name
-  private String name;
-  private String defaultInterpreterGroup;
-  private boolean addingEmptyParagraph = false;
-  private List<NewParagraphRequest> paragraphs;
-  private String revisionId;
+  private final String name;
+  private final String defaultInterpreterGroup;
+  private final Boolean addingEmptyParagraph;

Review Comment:
   I found the part of the documentation that describes the default value for 
boolean and other primitive types.
   
https://github.com/google/gson/blob/master/UserGuide.md#finer-points-with-objects
   
   After consulting with the developers in my company, I will look for 
primitive data types in other API endpoints and add null checking here as well.



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@zeppelin.apache.org

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

Reply via email to