From 8a00454ce43880eecc5224d19aac04876a8d52a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 13 May 2016 10:39:30 +0200 Subject: [PATCH] SONAR-7109 don't use deprecated default serverBaseUrl in ServerImpl methods isSecured() and getPublicRootUrl() still used it --- .../src/main/java/org/sonar/server/platform/ServerImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java index 4b2e155fd8d..43ee7052344 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java @@ -48,7 +48,6 @@ import static com.google.common.base.Preconditions.checkState; import static org.apache.commons.lang.StringUtils.isEmpty; import static org.apache.commons.lang.StringUtils.isNotEmpty; import static org.sonar.api.CoreProperties.SERVER_BASE_URL; -import static org.sonar.api.CoreProperties.SERVER_BASE_URL_DEFAULT_VALUE; import static org.sonar.server.app.TomcatContexts.PROPERTY_CONTEXT; public final class ServerImpl extends Server implements Startable { @@ -156,7 +155,7 @@ public final class ServerImpl extends Server implements Startable { @Override public String getPublicRootUrl() { - return get(SERVER_BASE_URL, SERVER_BASE_URL_DEFAULT_VALUE); + return getURL(); } @Override @@ -166,7 +165,7 @@ public final class ServerImpl extends Server implements Startable { @Override public boolean isSecured() { - return get(SERVER_BASE_URL, SERVER_BASE_URL_DEFAULT_VALUE).startsWith("https://"); + return getURL().startsWith("https://"); } private static String readVersion(String filename) throws IOException { -- 2.39.5