mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Reorder methods in BitsquareEnvironment for clarity
This commit is contained in:
parent
9adc41e23f
commit
14dde61832
@ -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…
x
Reference in New Issue
Block a user