mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-12 17:59:34 -04:00
Reorder methods in BitsquareEnvironment for clarity
This commit is contained in:
parent
9adc41e23f
commit
14dde61832
1 changed files with 15 additions and 15 deletions
|
@ -92,6 +92,21 @@ public class BitsquareEnvironment extends StandardEnvironment {
|
|||
}
|
||||
|
||||
|
||||
PropertySource<?> filesystemProperties() throws Exception {
|
||||
String location = String.format("file:%s/bitsquare.properties", appDataDir);
|
||||
Resource resource = resourceLoader.getResource(location);
|
||||
|
||||
if (!resource.exists())
|
||||
return new PropertySource.StubPropertySource(BITSQUARE_FILESYSTEM_PROPERTY_SOURCE_NAME);
|
||||
|
||||
return new ResourcePropertySource(BITSQUARE_FILESYSTEM_PROPERTY_SOURCE_NAME, resource);
|
||||
}
|
||||
|
||||
PropertySource<?> classpathProperties() throws Exception {
|
||||
Resource resource = resourceLoader.getResource("classpath:bitsquare.properties");
|
||||
return new ResourcePropertySource(BITSQUARE_CLASSPATH_PROPERTY_SOURCE_NAME, resource);
|
||||
}
|
||||
|
||||
PropertySource<?> defaultProperties() throws Exception {
|
||||
return new PropertiesPropertySource(BITSQUARE_DEFAULT_PROPERTY_SOURCE_NAME, new Properties() {{
|
||||
setProperty(APP_DATA_DIR_KEY, appDataDir);
|
||||
|
@ -110,21 +125,6 @@ public class BitsquareEnvironment extends StandardEnvironment {
|
|||
}});
|
||||
}
|
||||
|
||||
PropertySource<?> classpathProperties() throws Exception {
|
||||
Resource resource = resourceLoader.getResource("classpath:bitsquare.properties");
|
||||
return new ResourcePropertySource(BITSQUARE_CLASSPATH_PROPERTY_SOURCE_NAME, resource);
|
||||
}
|
||||
|
||||
PropertySource<?> filesystemProperties() throws Exception {
|
||||
String location = String.format("file:%s/bitsquare.properties", appDataDir);
|
||||
Resource resource = resourceLoader.getResource(location);
|
||||
|
||||
if (!resource.exists())
|
||||
return new PropertySource.StubPropertySource(BITSQUARE_FILESYSTEM_PROPERTY_SOURCE_NAME);
|
||||
|
||||
return new ResourcePropertySource(BITSQUARE_FILESYSTEM_PROPERTY_SOURCE_NAME, resource);
|
||||
}
|
||||
|
||||
|
||||
private static String defaultUserDataDir() {
|
||||
String os = System.getProperty("os.name").toLowerCase();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue