Remove DEFAULT_SCHEMES and DEFAULT_COMMANDS

Using these sentinels complicated the implementation of the core
download-commands plugin, and inadvertently allowed for undocumented
enum values when reading from the config. Simplify callers by
prepopulating the sets with the proper default values when nothing is
specified in the config.

Change-Id: Ib1cb8a255110adec241608bf62d5331fd706794e
This commit is contained in:
Dave Borowitz
2015-09-03 16:04:10 -04:00
parent c6fa065223
commit f01551975f
5 changed files with 26 additions and 14 deletions

View File

@@ -130,8 +130,6 @@ public class DefaultCommandModule extends CommandModule {
}
private boolean sshEnabled() {
return downloadConfig.getDownloadSchemes().contains(DownloadScheme.SSH)
|| downloadConfig.getDownloadSchemes().contains(
DownloadScheme.DEFAULT_DOWNLOADS);
return downloadConfig.getDownloadSchemes().contains(DownloadScheme.SSH);
}
}