Fix AssertionError message (#2044)

Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
This commit is contained in:
Lukáš Vlček 2022-02-02 23:58:25 +01:00 committed by GitHub
parent c8ac037389
commit 270c59f523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -401,7 +401,7 @@ class InstallPluginCommand extends EnvironmentAwareCommand {
boolean urlExists(Terminal terminal, String urlString) throws IOException {
terminal.println(VERBOSE, "Checking if url exists: " + urlString);
URL url = new URL(urlString);
assert "https".equals(url.getProtocol()) : "Only http urls can be checked";
assert "https".equals(url.getProtocol()) : "Use of https protocol is required";
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.addRequestProperty("User-Agent", "opensearch-plugin-installer");
urlConnection.setRequestMethod("HEAD");