From 11979c4d2ef4a6d6d6494dc0a87fe1b9f9e4750a Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Fri, 18 May 2018 13:40:06 +0200 Subject: [PATCH] Fixed loosing alias names (dataManager initialized when createInstance was called). --- src/main/java/ch/psi/pshell/core/Context.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/ch/psi/pshell/core/Context.java b/src/main/java/ch/psi/pshell/core/Context.java index a44f8b79..3d0d04a0 100644 --- a/src/main/java/ch/psi/pshell/core/Context.java +++ b/src/main/java/ch/psi/pshell/core/Context.java @@ -308,13 +308,12 @@ public static Context createInstance() { if (instance == null) { instance = new Context(); instance.pluginManager.loadExtensionsFolder(); - } - - //To provide services even if context does not initialize all right (and in disabled mode). - try { - instance.dataManager.initialize(); - } catch (Throwable ex) { - logger.log(Level.SEVERE, null, ex); + //To provide services even if context does not initialize all right (and in disabled mode). + try { + instance.dataManager.initialize(); + } catch (Throwable ex) { + logger.log(Level.SEVERE, null, ex); + } } return instance;