mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-501: fix NPE on Note creation by NotebookRepo, \wo DI constructor
This commit is contained in:
parent
cf44b1f8b1
commit
73a28bb574
2 changed files with 7 additions and 4 deletions
|
|
@ -133,6 +133,10 @@ public class Note implements Serializable, JobListener {
|
|||
this.repo = repo;
|
||||
}
|
||||
|
||||
public void setIndex(SearchService index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Map<String, List<AngularObject>> getAngularObjects() {
|
||||
return angularObjects;
|
||||
|
|
|
|||
|
|
@ -252,15 +252,14 @@ public class Notebook {
|
|||
return null;
|
||||
}
|
||||
|
||||
// set NoteInterpreterLoader
|
||||
//Manually inject ALL dependencies, as DI constructor was NOT used
|
||||
note.setIndex(this.notebookIndex);
|
||||
|
||||
NoteInterpreterLoader replLoader = new NoteInterpreterLoader(replFactory);
|
||||
note.setReplLoader(replLoader);
|
||||
replLoader.setNoteId(note.id());
|
||||
|
||||
// set JobListenerFactory
|
||||
note.setJobListenerFactory(jobListenerFactory);
|
||||
|
||||
// set notebookRepo
|
||||
note.setNotebookRepo(notebookRepo);
|
||||
|
||||
Map<String, SnapshotAngularObject> angularObjectSnapshot = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue