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

@@ -27,12 +27,12 @@ public final class AccountGeneralPreferences {
/** Preferred scheme type to download a change. */
public static enum DownloadScheme {
ANON_GIT, ANON_HTTP, HTTP, SSH, REPO_DOWNLOAD, DEFAULT_DOWNLOADS
ANON_GIT, ANON_HTTP, HTTP, SSH, REPO_DOWNLOAD
}
/** Preferred method to download a change. */
public static enum DownloadCommand {
REPO_DOWNLOAD, PULL, CHECKOUT, CHERRY_PICK, FORMAT_PATCH, DEFAULT_DOWNLOADS
REPO_DOWNLOAD, PULL, CHECKOUT, CHERRY_PICK, FORMAT_PATCH
}
public static enum DateFormat {