fix init not to initialize every time

This commit is contained in:
Khalid Huseynov 2016-09-23 18:13:51 +09:00
parent 17eae84c0c
commit 9cf1d8848e

View file

@ -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;
}