Skip to content

Commit

Permalink
fixing an ordering problem in the singleton pluginmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryGeorgist committed Jun 21, 2023
1 parent e86a224 commit fd9d6d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/usace/cc/plugin/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public final class PluginManager {
private Payload _payload;
private Logger _logger;
private static PluginManager _instance = null;
private boolean _hasUpdatedPaths = false;
public static PluginManager getInstance(){
if (_instance==null){
_instance = new PluginManager();
Expand Down Expand Up @@ -45,7 +46,7 @@ private PluginManager(){
}
i ++;
}
substitutePathVariables();
//substitutePathVariables();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -86,6 +87,10 @@ public String SubstitutePath(String path) {
return path;
}
public Payload getPayload(){
if (!_hasUpdatedPaths){
substitutePathVariables();
_hasUpdatedPaths = true;
}
return _payload;
}
public FileDataStore getFileStore(String storeName){
Expand Down

0 comments on commit fd9d6d4

Please sign in to comment.