File (@Nullable File userSettingsFile, @Nullable File globalSettingsFile) { if (userSettingsFile != null) { final String fromUserSettings = getRepositoryFromSettings(userSettingsFile); if (!isEmpty(fromUserSettings)) { return new File(fromUserSettings); } } if (globalSettingsFile != null) { final String fromGlobalSettings = getRepositoryFromSettings(globalSettingsFile); if (!isEmpty(fromGlobalSettings)) { return new File(fromGlobalSettings); } } return null; }