Allow both .yml and .yaml as valid YAML configuration file extensions

This commit is contained in:
Nicholas Tung 2012-11-08 14:12:51 -08:00 committed by Shay Banon
parent 3ff54c0b5c
commit 46e1886975
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public final class SettingsLoaderFactory {
public static SettingsLoader loaderFromResource(String resourceName) { public static SettingsLoader loaderFromResource(String resourceName) {
if (resourceName.endsWith(".json")) { if (resourceName.endsWith(".json")) {
return new JsonSettingsLoader(); return new JsonSettingsLoader();
} else if (resourceName.endsWith(".yml")) { } else if (resourceName.endsWith(".yml") || resourceName.endsWith(".yaml")) {
return new YamlSettingsLoader(); return new YamlSettingsLoader();
} else if (resourceName.endsWith(".properties")) { } else if (resourceName.endsWith(".properties")) {
return new PropertiesSettingsLoader(); return new PropertiesSettingsLoader();