Fix NPE and some refactoring

This commit is contained in:
karuppayya 2016-11-21 21:14:12 +05:30 committed by Karup
parent 9b3a3e28e7
commit 3d9a5733c0
2 changed files with 6 additions and 1 deletions

View file

@ -2343,8 +2343,8 @@ public class NotebookServer extends WebSocketServlet
Note note = notebook().getNote(noteId);
if (note != null) {
Paragraph paragraph = note.getParagraph(paraId);
paragraph.clearRuntimeInfo();
if (paragraph != null) {
paragraph.clearRuntimeInfo();
broadcast(noteId, new Message(OP.PARAGRAPH).put("paragraph", paragraph));
}
}
@ -2352,5 +2352,6 @@ public class NotebookServer extends WebSocketServlet
}
}
}
setting.clearNoteIdAndParaMap();
}
}

View file

@ -420,4 +420,8 @@ public class InterpreterSetting {
return noteIdToParaIdsetMap;
>>>>>>> Ability to view spark job urls in each paragraph
}
public void clearNoteIdAndParaMap() {
noteIdToParaIdsetMap = null;
}
}