Specify useForceHttps for RepositoryHelper.loadPlugins only in one method.

This commit is contained in:
Ivan Chirkov
2016-07-07 19:34:42 +02:00
parent 98b85b83c0
commit f16a62005b
2 changed files with 2 additions and 15 deletions
@@ -95,26 +95,14 @@ public class RepositoryHelper {
@NotNull
public static List<IdeaPluginDescriptor> loadPlugins(@Nullable String repositoryUrl, @Nullable ProgressIndicator indicator) throws IOException {
boolean forceHttps = repositoryUrl == null && IdeaApplication.isLoaded() && UpdateSettings.getInstance().canUseSecureConnection();
return loadPlugins(repositoryUrl, null, forceHttps, indicator);
return loadPlugins(repositoryUrl, null, indicator);
}
/**
* Loads list of plugins, compatible with a given build, from a given plugin repository (main repository if null).
*/
@NotNull
public static List<IdeaPluginDescriptor> loadPlugins(@Nullable String repositoryUrl,
@Nullable BuildNumber buildnumber,
@Nullable ProgressIndicator indicator) throws IOException {
boolean forceHttps = repositoryUrl == null && IdeaApplication.isLoaded() && UpdateSettings.getInstance().canUseSecureConnection();
return loadPlugins(repositoryUrl, buildnumber, forceHttps, indicator);
}
@NotNull
public static List<IdeaPluginDescriptor> loadPlugins(@Nullable String repositoryUrl,
@Nullable BuildNumber buildnumber,
boolean forceHttps,
@Nullable ProgressIndicator indicator) throws IOException {
return loadPlugins(repositoryUrl, buildnumber, null, forceHttps, indicator);
}
@@ -221,8 +221,7 @@ object UpdateChecker {
outer@ for (host in hosts) {
try {
val forceHttps = host == null && updateSettings.canUseSecureConnection()
val list = RepositoryHelper.loadPlugins(host, buildNumber, forceHttps, indicator)
val list = RepositoryHelper.loadPlugins(host, buildNumber, indicator)
for (descriptor in list) {
val id = descriptor.pluginId
if (updateable.containsKey(id)) {