Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9308 config paths #2

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,14 @@ public String getConfigFileRelative()
*/
public String getConfigFileRelative(String file)
{
StringBuffer relPath = new StringBuffer(CONFIG_DIR);
if (IOUtil.isJavaWebStart() && UIUtilities.isWindowsOS())
relPath.append("/");
else relPath.append(File.separatorChar);
relPath.append(file);
return relPath.toString();
if (IOUtil.isJavaWebStart()) {
StringBuffer relPath = new StringBuffer(CONFIG_DIR);
if (UIUtilities.isWindowsOS()) relPath.append("/");
else relPath.append(File.separatorChar);
relPath.append(file);
return relPath.toString();
}
return resolveFilePath(file, CONFIG_DIR);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ private void createAgent(AgentInfo info, int value)
private Registry createAgentRegistry(String configFile)
throws Exception
{
String absPathName = container.getHomeDir() + File.separator +
container.getConfigFileRelative(configFile);
Registry agentReg = RegistryFactory.makeNew(absPathName),
String pathName = container.getConfigFileRelative(configFile);
Registry agentReg = RegistryFactory.makeNew(pathName),
containerReg = container.getRegistry();
RegistryFactory.linkEventBus(containerReg.getEventBus(), agentReg);
RegistryFactory.linkLogger(containerReg.getLogger(), agentReg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ void configure() {}
void execute()
throws StartupException
{
String file = container.getHomeDir() + File.separator +
container.getConfigFileRelative();
String file = container.getConfigFileRelative();
Registry reg = container.getRegistry();
try {
RegistryFactory.fillFromFile(file, reg);
Expand Down