felixcheung commented on a change in pull request #3276: [ZEPPELIN-3928] Fix 
bugs AngularBind operation NullPointerException
URL: https://github.com/apache/zeppelin/pull/3276#discussion_r245467352
 
 

 ##########
 File path: 
zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
 ##########
 @@ -1708,20 +1708,16 @@ public void onAdd(String interpreterGroupId, 
AngularObject object) {
 
   @Override
   public void onUpdate(String interpreterGroupId, AngularObject object) {
-    if (getNotebook() == null) {
+    if (getNotebook() == null || object.getNoteId() == null) {
       return;
     }
 
-    List<Note> notes = getNotebook().getAllNotes();
-    for (Note note : notes) {
-      if (object.getNoteId() != null && 
!note.getId().equals(object.getNoteId())) {
-        continue;
-      }
-
+    Note note = getNotebook().getNote(object.getNoteId());
 
 Review comment:
   I'm actually not sure why it wasn't doing `getNotebook().getNote(note id)` 
before @jongyoul @zjffdu ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to