mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix init not to initialize every time
This commit is contained in:
parent
17eae84c0c
commit
9cf1d8848e
1 changed files with 10 additions and 10 deletions
|
|
@ -49,16 +49,16 @@ public class NotebookAuthorization {
|
|||
public static NotebookAuthorization init(ZeppelinConfiguration config) {
|
||||
if (instance == null) {
|
||||
instance = new NotebookAuthorization();
|
||||
}
|
||||
conf = config;
|
||||
filePath = conf.getNotebookAuthorizationPath();
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.setPrettyPrinting();
|
||||
gson = builder.create();
|
||||
try {
|
||||
loadFromFile();
|
||||
} catch (IOException e) {
|
||||
LOG.error("Error loading NotebookAuthorization", e);
|
||||
conf = config;
|
||||
filePath = conf.getNotebookAuthorizationPath();
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.setPrettyPrinting();
|
||||
gson = builder.create();
|
||||
try {
|
||||
loadFromFile();
|
||||
} catch (IOException e) {
|
||||
LOG.error("Error loading NotebookAuthorization", e);
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue