Make DownloadScheme.isAuthSupported an abstract method

It is too easy to forget to override isAuthSupported in download
schemes that support but do not require authentication.  Make it
abstract so anyone adding a new download scheme has to make an
explicit choice about whether it should show up on changes that are
not world-readable.

Change-Id: Ifbc70c0d3b6eea08ceee726317381cabd3892e03
This commit is contained in:
Jonathan Nieder
2013-10-31 14:42:01 -07:00
parent 5d7a8decfe
commit 935ce8afdc
2 changed files with 2 additions and 4 deletions

View File

@@ -30,9 +30,7 @@ public abstract class DownloadScheme {
public abstract boolean isAuthRequired();
/** @return whether this scheme supports authentication */
public boolean isAuthSupported() {
return isAuthRequired();
}
public abstract boolean isAuthSupported();
/** @return whether the download scheme is enabled */
public abstract boolean isEnabled();