From d37576c7ccba68bae9395943c3ce87fb3a9bb7c1 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 12 Sep 2016 18:43:26 +0200 Subject: [PATCH] Remove unused methods about settings in JRubyFacade --- .../java/org/sonar/server/ui/JRubyFacade.java | 29 ------------------- .../java/org/sonar/api/config/Settings.java | 1 - 2 files changed, 30 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java index 5b4dd2021bb..dd0f85072c6 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java @@ -19,7 +19,6 @@ */ package org.sonar.server.ui; -import java.net.InetAddress; import java.sql.Connection; import java.util.Collection; import java.util.Date; @@ -28,7 +27,6 @@ import java.util.Map; import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.sonar.api.Plugin; -import org.sonar.api.config.License; import org.sonar.api.config.PropertyDefinitions; import org.sonar.api.config.Settings; import org.sonar.api.platform.NewUserHandler; @@ -59,7 +57,6 @@ import org.sonar.server.measure.MeasureFilterEngine; import org.sonar.server.measure.MeasureFilterResult; import org.sonar.server.platform.PersistentSettings; import org.sonar.server.platform.Platform; -import org.sonar.server.platform.ServerIdGenerator; import org.sonar.server.platform.db.migrations.DatabaseMigrator; import org.sonar.server.platform.ws.UpgradesAction; import org.sonar.server.rule.RuleRepositories; @@ -125,8 +122,6 @@ public final class JRubyFacade { return get(ResourceTypes.class).getChildrenQualifiers(qualifier); } - // UPDATE CENTER ------------------------------------------------------------ - // PLUGINS ------------------------------------------------------------------ public PropertyDefinitions getPropertyDefinitions() { return get(PropertyDefinitions.class); @@ -217,14 +212,6 @@ public final class JRubyFacade { return get(Settings.class).getString(key); } - public List getValidInetAddressesForServerId() { - return get(ServerIdGenerator.class).getAvailableAddresses(); - } - - public String generateServerId(String organisation, String ipAddress) { - return get(ServerIdGenerator.class).generate(organisation, ipAddress); - } - public Connection getConnection() { try { return get(Database.class).getDataSource().getConnection(); @@ -281,22 +268,6 @@ public final class JRubyFacade { Loggers.get(getClass()).error(message); } - public boolean hasSecretKey() { - return get(Settings.class).getEncryption().hasSecretKey(); - } - - public String encrypt(String clearText) { - return get(Settings.class).getEncryption().encrypt(clearText); - } - - public String generateRandomSecretKey() { - return get(Settings.class).getEncryption().generateRandomSecretKey(); - } - - public License parseLicense(String base64) { - return License.readBase64(base64); - } - public String getServerHome() { return get(Settings.class).getString(ProcessProperties.PATH_HOME); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java index 3b6e48d10cb..b3be022b635 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java @@ -127,7 +127,6 @@ public abstract class Settings { */ public abstract Map getProperties(); - // FIXME scope to be replaced by "protected" as soon as not used by JRubyFacade public Encryption getEncryption() { return encryption; } -- 2.39.5