liuxunorg commented on a change in pull request #3276: [ZEPPELIN-3928] Fix bugs
AngularBind operation NullPointerException
URL: https://github.com/apache/zeppelin/pull/3276#discussion_r245468170
##########
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:
`object.getNoteId() == null`, Can also not add this code, Just to be safer,
Or do I cancel this judgment code?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services