diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-06-19 13:56:51 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-12 20:21:14 +0200 |
commit | 93dc9770902dc7e168869d88b5ad731bfc0bedd9 (patch) | |
tree | 97ba885661d5cd9a2115fe212df31bacec9f9947 /server/sonar-server/src | |
parent | 7c7d9b6b90244d2c974207862071caccdb2c9bb5 (diff) | |
download | sonarqube-93dc9770902dc7e168869d88b5ad731bfc0bedd9.tar.gz sonarqube-93dc9770902dc7e168869d88b5ad731bfc0bedd9.zip |
Extract implementation from plugin API and create new module sonar-plugin-api-impl
Diffstat (limited to 'server/sonar-server/src')
130 files changed, 193 insertions, 1312 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java index a9082abcdc3..cbbf9034210 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java @@ -25,11 +25,11 @@ import javax.annotation.Nullable; import org.sonar.api.SonarEdition; import org.sonar.api.SonarQubeSide; import org.sonar.api.SonarQubeVersion; -import org.sonar.api.internal.MetadataLoader; -import org.sonar.api.internal.SonarRuntimeImpl; +import org.sonar.api.impl.context.MetadataLoader; +import org.sonar.api.impl.context.SonarRuntimeImpl; import org.sonar.api.utils.System2; import org.sonar.api.utils.Version; -import org.sonar.api.utils.internal.TempFolderCleaner; +import org.sonar.server.util.TempFolderCleaner; import org.sonar.core.config.CorePropertyDefinitions; import org.sonar.core.extension.CoreExtensionRepositoryImpl; import org.sonar.core.extension.CoreExtensionsLoader; diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultDebtRemediationFunctions.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultDebtRemediationFunctions.java deleted file mode 100644 index 933aa366b2f..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultDebtRemediationFunctions.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import javax.annotation.Nullable; -import org.sonar.api.server.debt.DebtRemediationFunction; -import org.sonar.api.server.debt.internal.DefaultDebtRemediationFunction; -import org.sonar.api.server.rule.RulesDefinition; -import org.sonar.api.utils.MessageException; - -/** - * Factory of {@link org.sonar.api.server.debt.DebtRemediationFunction} that keeps - * a context of rule for better error messages. Used only when declaring rules. - * - * @see org.sonar.api.server.rule.RulesDefinition - */ -class DefaultDebtRemediationFunctions implements RulesDefinition.DebtRemediationFunctions { - - private final String repoKey; - private final String key; - - DefaultDebtRemediationFunctions(String repoKey, String key) { - this.repoKey = repoKey; - this.key = key; - } - - @Override - public DebtRemediationFunction linear(String gapMultiplier) { - return create(DefaultDebtRemediationFunction.Type.LINEAR, gapMultiplier, null); - } - - @Override - public DebtRemediationFunction linearWithOffset(String gapMultiplier, String baseEffort) { - return create(DefaultDebtRemediationFunction.Type.LINEAR_OFFSET, gapMultiplier, baseEffort); - } - - @Override - public DebtRemediationFunction constantPerIssue(String baseEffort) { - return create(DefaultDebtRemediationFunction.Type.CONSTANT_ISSUE, null, baseEffort); - } - - @Override - public DebtRemediationFunction create(DebtRemediationFunction.Type type, @Nullable String gapMultiplier, @Nullable String baseEffort) { - try { - return new DefaultDebtRemediationFunction(type, gapMultiplier, baseEffort); - } catch (Exception e) { - throw MessageException.of(String.format("The rule '%s:%s' is invalid : %s ", this.repoKey, this.key, e.getMessage())); - } - } - -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewParam.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewParam.java deleted file mode 100644 index ea2740210ce..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewParam.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.server.rule.RuleParamType; -import org.sonar.api.server.rule.RulesDefinition; - -import static org.apache.commons.lang.StringUtils.defaultIfEmpty; - -public class DefaultNewParam implements RulesDefinition.NewParam { - private final String key; - private String name; - private String description; - private String defaultValue; - private RuleParamType type = RuleParamType.STRING; - - DefaultNewParam(String key) { - this.key = this.name = key; - } - - @Override - public String key() { - return key; - } - - @Override - public DefaultNewParam setName(@Nullable String s) { - // name must never be null. - this.name = StringUtils.defaultIfBlank(s, key); - return this; - } - - @Override - public DefaultNewParam setType(RuleParamType t) { - this.type = t; - return this; - } - - @Override - public DefaultNewParam setDescription(@Nullable String s) { - this.description = StringUtils.defaultIfBlank(s, null); - return this; - } - - @Override - public DefaultNewParam setDefaultValue(@Nullable String s) { - this.defaultValue = defaultIfEmpty(s, null); - return this; - } - - public String name() { - return name; - } - - public String description() { - return description; - } - - public String defaultValue() { - return defaultValue; - } - - public RuleParamType type() { - return type; - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRepository.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRepository.java deleted file mode 100644 index 3607e601340..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRepository.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.server.rule.RulesDefinition; - -import static org.sonar.api.utils.Preconditions.checkArgument; - -public class DefaultNewRepository implements RulesDefinition.NewRepository { - private final RuleDefinitionContext context; - private final String key; - private final boolean isExternal; - private final String language; - private String name; - private final Map<String, RulesDefinition.NewRule> newRules = new HashMap<>(); - - DefaultNewRepository(RuleDefinitionContext context, String key, String language, boolean isExternal) { - this.context = context; - this.key = key; - this.name = key; - this.language = language; - this.isExternal = isExternal; - } - - @Override - public boolean isExternal() { - return isExternal; - } - - @Override - public String key() { - return key; - } - - String language() { - return language; - } - - Map<String, RulesDefinition.NewRule> newRules() { - return newRules; - } - - String name() { - return name; - } - - @Override - public DefaultNewRepository setName(@Nullable String s) { - if (StringUtils.isNotEmpty(s)) { - this.name = s; - } - return this; - } - - @Override - public RulesDefinition.NewRule createRule(String ruleKey) { - checkArgument(!newRules.containsKey(ruleKey), "The rule '%s' of repository '%s' is declared several times", ruleKey, key); - RulesDefinition.NewRule newRule = new DefaultNewRule(context.currentPluginKey(), key, ruleKey); - newRules.put(ruleKey, newRule); - return newRule; - } - - @CheckForNull - @Override - public RulesDefinition.NewRule rule(String ruleKey) { - return newRules.get(ruleKey); - } - - @Override - public Collection<RulesDefinition.NewRule> rules() { - return newRules.values(); - } - - @Override - public void done() { - // note that some validations can be done here, for example for - // verifying that at least one rule is declared - - context.registerRepository(this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("NewRepository{"); - sb.append("key='").append(key).append('\''); - sb.append(", language='").append(language).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRule.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRule.java deleted file mode 100644 index 3496d2d1035..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRule.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import java.io.IOException; -import java.net.URL; -import java.util.Collection; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; -import org.apache.commons.io.IOUtils; -import org.sonar.api.rule.RuleKey; -import org.sonar.api.rule.RuleScope; -import org.sonar.api.rule.RuleStatus; -import org.sonar.api.rule.Severity; -import org.sonar.api.rules.RuleType; -import org.sonar.api.server.debt.DebtRemediationFunction; -import org.sonar.api.server.rule.RuleTagFormat; -import org.sonar.api.server.rule.RulesDefinition; - -import static java.lang.String.format; -import static java.nio.charset.StandardCharsets.UTF_8; -import static org.apache.commons.lang.StringUtils.isEmpty; -import static org.apache.commons.lang.StringUtils.trimToNull; -import static org.sonar.api.utils.Preconditions.checkArgument; -import static org.sonar.api.utils.Preconditions.checkState; - -class DefaultNewRule implements RulesDefinition.NewRule { - private final String pluginKey; - private final String repoKey; - private final String key; - private RuleType type; - private String name; - private String htmlDescription; - private String markdownDescription; - private String internalKey; - private String severity = Severity.MAJOR; - private boolean template; - private RuleStatus status = RuleStatus.defaultStatus(); - private DebtRemediationFunction debtRemediationFunction; - private String gapDescription; - private final Set<String> tags = new TreeSet<>(); - private final Set<String> securityStandards = new TreeSet<>(); - private final Map<String, RulesDefinition.NewParam> paramsByKey = new HashMap<>(); - private final RulesDefinition.DebtRemediationFunctions functions; - private boolean activatedByDefault; - private RuleScope scope; - private final Set<RuleKey> deprecatedRuleKeys = new TreeSet<>(); - - DefaultNewRule(@Nullable String pluginKey, String repoKey, String key) { - this.pluginKey = pluginKey; - this.repoKey = repoKey; - this.key = key; - this.functions = new DefaultDebtRemediationFunctions(repoKey, key); - } - - @Override - public String key() { - return this.key; - } - - @CheckForNull - @Override - public RuleScope scope() { - return this.scope; - } - - @Override - public DefaultNewRule setScope(RuleScope scope) { - this.scope = scope; - return this; - } - - @Override - public DefaultNewRule setName(String s) { - this.name = trimToNull(s); - return this; - } - - @Override - public DefaultNewRule setTemplate(boolean template) { - this.template = template; - return this; - } - - @Override - public DefaultNewRule setActivatedByDefault(boolean activatedByDefault) { - this.activatedByDefault = activatedByDefault; - return this; - } - - @Override - public DefaultNewRule setSeverity(String s) { - checkArgument(Severity.ALL.contains(s), "Severity of rule %s is not correct: %s", this, s); - this.severity = s; - return this; - } - - @Override - public DefaultNewRule setType(RuleType t) { - this.type = t; - return this; - } - - @Override - public DefaultNewRule setHtmlDescription(@Nullable String s) { - checkState(markdownDescription == null, "Rule '%s' already has a Markdown description", this); - this.htmlDescription = trimToNull(s); - return this; - } - - @Override - public DefaultNewRule setHtmlDescription(@Nullable URL classpathUrl) { - if (classpathUrl != null) { - try { - setHtmlDescription(IOUtils.toString(classpathUrl, UTF_8)); - } catch (IOException e) { - throw new IllegalStateException("Fail to read: " + classpathUrl, e); - } - } else { - this.htmlDescription = null; - } - return this; - } - - @Override - public DefaultNewRule setMarkdownDescription(@Nullable String s) { - checkState(htmlDescription == null, "Rule '%s' already has an HTML description", this); - this.markdownDescription = trimToNull(s); - return this; - } - - @Override - public DefaultNewRule setMarkdownDescription(@Nullable URL classpathUrl) { - if (classpathUrl != null) { - try { - setMarkdownDescription(IOUtils.toString(classpathUrl, UTF_8)); - } catch (IOException e) { - throw new IllegalStateException("Fail to read: " + classpathUrl, e); - } - } else { - this.markdownDescription = null; - } - return this; - } - - @Override - public DefaultNewRule setStatus(RuleStatus status) { - checkArgument(RuleStatus.REMOVED != status, "Status 'REMOVED' is not accepted on rule '%s'", this); - this.status = status; - return this; - } - - @Override - public DefaultNewRule setDebtSubCharacteristic(@Nullable String s) { - return this; - } - - @Override - public RulesDefinition.DebtRemediationFunctions debtRemediationFunctions() { - return functions; - } - - @Override - public DefaultNewRule setDebtRemediationFunction(@Nullable DebtRemediationFunction fn) { - this.debtRemediationFunction = fn; - return this; - } - - @Deprecated - @Override - public DefaultNewRule setEffortToFixDescription(@Nullable String s) { - return setGapDescription(s); - } - - @Override - public DefaultNewRule setGapDescription(@Nullable String s) { - this.gapDescription = s; - return this; - } - - @Override - public RulesDefinition.NewParam createParam(String paramKey) { - checkArgument(!paramsByKey.containsKey(paramKey), "The parameter '%s' is declared several times on the rule %s", paramKey, this); - DefaultNewParam param = new DefaultNewParam(paramKey); - paramsByKey.put(paramKey, param); - return param; - } - - @CheckForNull - @Override - public RulesDefinition.NewParam param(String paramKey) { - return paramsByKey.get(paramKey); - } - - @Override - public Collection<RulesDefinition.NewParam> params() { - return paramsByKey.values(); - } - - @Override - public DefaultNewRule addTags(String... list) { - for (String tag : list) { - RuleTagFormat.validate(tag); - tags.add(tag); - } - return this; - } - - @Override - public DefaultNewRule setTags(String... list) { - tags.clear(); - addTags(list); - return this; - } - - @Override - public DefaultNewRule addOwaspTop10(RulesDefinition.OwaspTop10... standards) { - for (RulesDefinition.OwaspTop10 owaspTop10 : standards) { - String standard = "owaspTop10:" + owaspTop10.name().toLowerCase(Locale.ENGLISH); - securityStandards.add(standard); - } - return this; - } - - @Override - public DefaultNewRule addCwe(int... nums) { - for (int num : nums) { - String standard = "cwe:" + num; - securityStandards.add(standard); - } - return this; - } - - @Override - public DefaultNewRule setInternalKey(@Nullable String s) { - this.internalKey = s; - return this; - } - - void validate() { - if (isEmpty(name)) { - throw new IllegalStateException(format("Name of rule %s is empty", this)); - } - if (isEmpty(htmlDescription) && isEmpty(markdownDescription)) { - throw new IllegalStateException(format("One of HTML description or Markdown description must be defined for rule %s", this)); - } - } - - @Override - public DefaultNewRule addDeprecatedRuleKey(String repository, String key) { - deprecatedRuleKeys.add(RuleKey.of(repository, key)); - return this; - } - - String pluginKey() { - return pluginKey; - } - - String repoKey() { - return repoKey; - } - - RuleType type() { - return type; - } - - String name() { - return name; - } - - String htmlDescription() { - return htmlDescription; - } - - String markdownDescription() { - return markdownDescription; - } - - @CheckForNull - String internalKey() { - return internalKey; - } - - String severity() { - return severity; - } - - boolean template() { - return template; - } - - RuleStatus status() { - return status; - } - - DebtRemediationFunction debtRemediationFunction() { - return debtRemediationFunction; - } - - String gapDescription() { - return gapDescription; - } - - Set<String> tags() { - return tags; - } - - Set<String> securityStandards() { - return securityStandards; - } - - Map<String, RulesDefinition.NewParam> paramsByKey() { - return paramsByKey; - } - - boolean activatedByDefault() { - return activatedByDefault; - } - - Set<RuleKey> deprecatedRuleKeys() { - return deprecatedRuleKeys; - } - - @Override - public String toString() { - return format("[repository=%s, key=%s]", repoKey, key); - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultParam.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultParam.java deleted file mode 100644 index 3e18fd740bd..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultParam.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; -import org.sonar.api.server.rule.RuleParamType; -import org.sonar.api.server.rule.RulesDefinition; - -@Immutable -public class DefaultParam implements RulesDefinition.Param { - private final String key; - private final String name; - private final String description; - private final String defaultValue; - private final RuleParamType type; - - DefaultParam(DefaultNewParam newParam) { - this.key = newParam.key(); - this.name = newParam.name(); - this.description = newParam.description(); - this.defaultValue = newParam.defaultValue(); - this.type = newParam.type(); - } - - @Override - public String key() { - return key; - } - - @Override - public String name() { - return name; - } - - @Override - @Nullable - public String description() { - return description; - } - - @Override - @Nullable - public String defaultValue() { - return defaultValue; - } - - @Override - public RuleParamType type() { - return type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RulesDefinition.Param that = (RulesDefinition.Param) o; - return key.equals(that.key()); - } - - @Override - public int hashCode() { - return key.hashCode(); - } - -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRepository.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRepository.java deleted file mode 100644 index 5723aa996bc..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRepository.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.server.rule.RulesDefinition; -import org.sonar.api.utils.log.Loggers; - -import static java.lang.String.format; -import static java.util.Collections.unmodifiableList; -import static java.util.Collections.unmodifiableMap; - -@Immutable -class DefaultRepository implements RulesDefinition.Repository { - private final String key; - private final String language; - private final String name; - private final boolean isExternal; - private final Map<String, RulesDefinition.Rule> rulesByKey; - - DefaultRepository(DefaultNewRepository newRepository, @Nullable RulesDefinition.Repository mergeInto) { - this.key = newRepository.key(); - this.language = newRepository.language(); - this.isExternal = newRepository.isExternal(); - Map<String, RulesDefinition.Rule> ruleBuilder = new HashMap<>(); - if (mergeInto != null) { - if (!StringUtils.equals(newRepository.language(), mergeInto.language()) || !StringUtils.equals(newRepository.key(), mergeInto.key())) { - throw new IllegalArgumentException(format("Bug - language and key of the repositories to be merged should be the sames: %s and %s", newRepository, mergeInto)); - } - this.name = StringUtils.defaultIfBlank(mergeInto.name(), newRepository.name()); - for (RulesDefinition.Rule rule : mergeInto.rules()) { - if (!newRepository.key().startsWith("common-") && ruleBuilder.containsKey(rule.key())) { - Loggers.get(getClass()).warn("The rule '{}' of repository '{}' is declared several times", rule.key(), mergeInto.key()); - } - ruleBuilder.put(rule.key(), rule); - } - } else { - this.name = newRepository.name(); - } - for (RulesDefinition.NewRule newRule : newRepository.newRules().values()) { - DefaultNewRule defaultNewRule = (DefaultNewRule) newRule; - defaultNewRule.validate(); - ruleBuilder.put(newRule.key(), new DefaultRule(this, defaultNewRule)); - } - this.rulesByKey = unmodifiableMap(ruleBuilder); - } - - @Override - public String key() { - return key; - } - - @Override - public String language() { - return language; - } - - @Override - public String name() { - return name; - } - - @Override - public boolean isExternal() { - return isExternal; - } - - @Override - @CheckForNull - public RulesDefinition.Rule rule(String ruleKey) { - return rulesByKey.get(ruleKey); - } - - @Override - public List<RulesDefinition.Rule> rules() { - return unmodifiableList(new ArrayList<>(rulesByKey.values())); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultRepository that = (DefaultRepository) o; - return key.equals(that.key); - } - - @Override - public int hashCode() { - return key.hashCode(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Repository{"); - sb.append("key='").append(key).append('\''); - sb.append(", language='").append(language).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRule.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRule.java deleted file mode 100644 index 84651101225..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRule.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import javax.annotation.CheckForNull; -import javax.annotation.concurrent.Immutable; -import org.sonar.api.rule.RuleKey; -import org.sonar.api.rule.RuleScope; -import org.sonar.api.rule.RuleStatus; -import org.sonar.api.rules.RuleType; -import org.sonar.api.server.debt.DebtRemediationFunction; -import org.sonar.api.server.rule.RuleTagsToTypeConverter; -import org.sonar.api.server.rule.RulesDefinition; - -import static java.lang.String.format; -import static java.util.Collections.unmodifiableList; - -@Immutable -public class DefaultRule implements RulesDefinition.Rule { - private final String pluginKey; - private final RulesDefinition.Repository repository; - private final String repoKey; - private final String key; - private final String name; - private final RuleType type; - private final String htmlDescription; - private final String markdownDescription; - private final String internalKey; - private final String severity; - private final boolean template; - private final DebtRemediationFunction debtRemediationFunction; - private final String gapDescription; - private final Set<String> tags; - private final Set<String> securityStandards; - private final Map<String, RulesDefinition.Param> params; - private final RuleStatus status; - private final boolean activatedByDefault; - private final RuleScope scope; - private final Set<RuleKey> deprecatedRuleKeys; - - DefaultRule(DefaultRepository repository, DefaultNewRule newRule) { - this.pluginKey = newRule.pluginKey(); - this.repository = repository; - this.repoKey = newRule.repoKey(); - this.key = newRule.key(); - this.name = newRule.name(); - this.htmlDescription = newRule.htmlDescription(); - this.markdownDescription = newRule.markdownDescription(); - this.internalKey = newRule.internalKey(); - this.severity = newRule.severity(); - this.template = newRule.template(); - this.status = newRule.status(); - this.debtRemediationFunction = newRule.debtRemediationFunction(); - this.gapDescription = newRule.gapDescription(); - this.scope = newRule.scope() == null ? RuleScope.MAIN : newRule.scope(); - this.type = newRule.type() == null ? RuleTagsToTypeConverter.convert(newRule.tags()) : newRule.type(); - Set<String> tagsBuilder = new TreeSet<>(newRule.tags()); - tagsBuilder.removeAll(RuleTagsToTypeConverter.RESERVED_TAGS); - this.tags = Collections.unmodifiableSet(tagsBuilder); - this.securityStandards = Collections.unmodifiableSet(new TreeSet<>(newRule.securityStandards())); - Map<String, RulesDefinition.Param> paramsBuilder = new HashMap<>(); - for (RulesDefinition.NewParam newParam : newRule.paramsByKey().values()) { - paramsBuilder.put(newParam.key(), new DefaultParam((DefaultNewParam) newParam)); - } - this.params = Collections.unmodifiableMap(paramsBuilder); - this.activatedByDefault = newRule.activatedByDefault(); - this.deprecatedRuleKeys = Collections.unmodifiableSet(new TreeSet<>(newRule.deprecatedRuleKeys())); - } - - public RulesDefinition.Repository repository() { - return repository; - } - - @Override - @CheckForNull - public String pluginKey() { - return pluginKey; - } - - @Override - public String key() { - return key; - } - - @Override - public String name() { - return name; - } - - @Override - public RuleScope scope() { - return scope; - } - - @Override - public RuleType type() { - return type; - } - - @Override - public String severity() { - return severity; - } - - @Override - @CheckForNull - public String htmlDescription() { - return htmlDescription; - } - - @Override - @CheckForNull - public String markdownDescription() { - return markdownDescription; - } - - @Override - public boolean template() { - return template; - } - - @Override - public boolean activatedByDefault() { - return activatedByDefault; - } - - @Override - public RuleStatus status() { - return status; - } - - @CheckForNull - @Deprecated - @Override - public String debtSubCharacteristic() { - return null; - } - - @CheckForNull - @Override - public DebtRemediationFunction debtRemediationFunction() { - return debtRemediationFunction; - } - - @Deprecated - @CheckForNull - @Override - public String effortToFixDescription() { - return gapDescription(); - } - - @CheckForNull - @Override - public String gapDescription() { - return gapDescription; - } - - @CheckForNull - @Override - public RulesDefinition.Param param(String key) { - return params.get(key); - } - - @Override - public List<RulesDefinition.Param> params() { - return unmodifiableList(new ArrayList<>(params.values())); - } - - @Override - public Set<String> tags() { - return tags; - } - - @Override - public Set<String> securityStandards() { - return securityStandards; - } - - @Override - public Set<RuleKey> deprecatedRuleKeys() { - return deprecatedRuleKeys; - } - - @CheckForNull - @Override - public String internalKey() { - return internalKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultRule other = (DefaultRule) o; - return key.equals(other.key) && repoKey.equals(other.repoKey); - } - - @Override - public int hashCode() { - int result = repoKey.hashCode(); - result = 31 * result + key.hashCode(); - return result; - } - - @Override - public String toString() { - return format("[repository=%s, key=%s]", repoKey, key); - } -} - diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionContext.java b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionContext.java deleted file mode 100644 index 69a876dabaa..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionContext.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.rule; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; -import org.sonar.api.rule.RuleKey; -import org.sonar.api.server.rule.RulesDefinition; - -import static java.util.Collections.emptyList; -import static java.util.Collections.unmodifiableList; -import static org.sonar.api.utils.Preconditions.checkState; - -public class RuleDefinitionContext implements RulesDefinition.Context { - private final Map<String, RulesDefinition.Repository> repositoriesByKey = new HashMap<>(); - private String currentPluginKey; - - @Override - public RulesDefinition.NewRepository createRepository(String key, String language) { - return new DefaultNewRepository(this, key, language, false); - } - - @Override - public RulesDefinition.NewRepository createExternalRepository(String engineId, String language) { - return new DefaultNewRepository(this, RuleKey.EXTERNAL_RULE_REPO_PREFIX + engineId, language, true); - } - - @Override - @Deprecated - public RulesDefinition.NewRepository extendRepository(String key, String language) { - return createRepository(key, language); - } - - @Override - @CheckForNull - public RulesDefinition.Repository repository(String key) { - return repositoriesByKey.get(key); - } - - @Override - public List<RulesDefinition.Repository> repositories() { - return unmodifiableList(new ArrayList<>(repositoriesByKey.values())); - } - - @Override - @Deprecated - public List<RulesDefinition.ExtendedRepository> extendedRepositories(String repositoryKey) { - return emptyList(); - } - - @Override - @Deprecated - public List<RulesDefinition.ExtendedRepository> extendedRepositories() { - return emptyList(); - } - - void registerRepository(DefaultNewRepository newRepository) { - RulesDefinition.Repository existing = repositoriesByKey.get(newRepository.key()); - if (existing != null) { - String existingLanguage = existing.language(); - checkState(existingLanguage.equals(newRepository.language()), - "The rule repository '%s' must not be defined for two different languages: %s and %s", - newRepository.key(), existingLanguage, newRepository.language()); - } - repositoriesByKey.put(newRepository.key(), new DefaultRepository(newRepository, existing)); - } - - public String currentPluginKey() { - return currentPluginKey; - } - - @Override - public void setCurrentPluginKey(@Nullable String pluginKey) { - this.currentPluginKey = pluginKey; - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java index ebe02c77f98..b503863846b 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java @@ -20,6 +20,7 @@ package org.sonar.server.rule; import org.sonar.api.server.rule.RulesDefinition; +import org.sonar.api.impl.server.RuleDefinitionContext; import org.sonar.server.plugins.ServerPluginRepository; /** diff --git a/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java b/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java index b71f3fe2f49..84ad9580067 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java @@ -19,13 +19,13 @@ */ package org.sonar.server.user.ws; +import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.sonar.api.internal.google.common.base.Preconditions; import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; diff --git a/server/sonar-server/src/main/java/org/sonar/server/util/TempFolderCleaner.java b/server/sonar-server/src/main/java/org/sonar/server/util/TempFolderCleaner.java new file mode 100644 index 00000000000..812af0edb85 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/util/TempFolderCleaner.java @@ -0,0 +1,53 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.util; + +import org.sonar.api.Startable; +import org.sonar.api.impl.utils.DefaultTempFolder; +import org.sonar.api.server.ServerSide; +import org.sonar.api.utils.TempFolder; + +@ServerSide +public class TempFolderCleaner implements Startable { + + private TempFolder defaultTempFolder; + + public TempFolderCleaner(TempFolder defaultTempFolder) { + this.defaultTempFolder = defaultTempFolder; + } + + /** + * This method should not be renamed. It follows the naming convention + * defined by IoC container. + */ + @Override + public void start() { + // Nothing to do + } + + /** + * This method should not be renamed. It follows the naming convention + * defined by IoC container. + */ + @Override + public void stop() { + ((DefaultTempFolder) defaultTempFolder).clean(); + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java b/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java index 09716e0b961..849ce475240 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; import org.sonar.api.server.ws.LocalConnector; -import org.sonar.api.server.ws.internal.ValidatingRequest; +import org.sonar.api.impl.ws.ValidatingRequest; public class LocalRequestAdapter extends ValidatingRequest { diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java b/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java index 7a449840507..966e0422315 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java @@ -31,8 +31,8 @@ import java.util.Map; import java.util.Optional; import javax.annotation.CheckForNull; import javax.servlet.http.HttpServletRequest; -import org.sonar.api.server.ws.internal.PartImpl; -import org.sonar.api.server.ws.internal.ValidatingRequest; +import org.sonar.api.impl.ws.PartImpl; +import org.sonar.api.impl.ws.ValidatingRequest; import org.sonar.api.utils.log.Loggers; import org.sonarqube.ws.MediaTypes; diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java b/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java index b9871f8b0c2..e7569e60350 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java @@ -33,7 +33,7 @@ import org.sonar.api.server.ws.LocalConnector; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; -import org.sonar.api.server.ws.internal.ValidatingRequest; +import org.sonar.api.impl.ws.ValidatingRequest; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; import org.sonar.api.utils.text.JsonWriter; diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java index de5f24347fc..2ad32ba9333 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java @@ -26,7 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.process.sharedmemoryfile.DefaultProcessCommands; import static org.assertj.core.api.Assertions.assertThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java index ee90eb0d094..290e5309433 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.security.Authenticator; import org.sonar.api.security.ExternalGroupsProvider; import org.sonar.api.security.ExternalUsersProvider; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java index 9f26430ab8c..05fe52566e3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java @@ -31,9 +31,9 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.core.util.stream.MoreCollectors; import org.sonar.db.DbTester; import org.sonar.db.user.GroupDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java index ed1f5c22084..f7b68650c27 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java @@ -33,7 +33,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java index 08aae1e567e..e4ae8ff6bcf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java @@ -32,7 +32,7 @@ import javax.crypto.spec.SecretKeySpec; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.core.util.UuidFactory; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java index cc3501e4fc0..f20e6c6bdf0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java @@ -23,7 +23,7 @@ package org.sonar.server.authentication; import org.junit.Rule; import org.junit.Test; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.user.UserDto; import org.sonar.db.user.UserTokenDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java index f37b861518a..3a633f733bc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java @@ -23,12 +23,12 @@ import com.google.common.collect.ImmutableSet; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceTypes; import org.sonar.api.server.authentication.UserIdentity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbTester; import org.sonar.db.alm.AlmAppInstallDto; import org.sonar.db.component.ResourceTypesRule; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java index 5b733411282..d81029a2c54 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java @@ -24,10 +24,10 @@ import java.util.stream.Collectors; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.server.authentication.UserIdentity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.core.util.stream.MoreCollectors; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java index cac1b7ceaf7..14dc0e5fa11 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java @@ -26,7 +26,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.authentication.BaseIdentityProvider; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java index 649818cbc64..cc6376e9a3a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java @@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.server.authentication.BasicAuthentication; import org.sonar.server.authentication.JwtHttpHandler; import org.sonar.server.authentication.event.AuthenticationException; diff --git a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java index 59ddc6217ab..fbfc5ccabf7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java @@ -30,7 +30,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Metric.Level; import org.sonar.api.server.ws.WebService; diff --git a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java index d1897463493..924462809fd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java @@ -27,7 +27,7 @@ import java.util.Locale; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.measures.Metric.Level; import org.sonar.api.server.ws.WebService; import org.sonar.api.server.ws.WebService.Param; diff --git a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java index d34710a619e..5706c2699fa 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java @@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.measures.Metric; import org.sonar.db.DbTester; import org.sonar.server.tester.UserSessionRule; diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java index c357b96495c..480ac6fc207 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java @@ -22,7 +22,7 @@ package org.sonar.server.batch; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.Scopes; import org.sonar.api.web.UserRole; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java index c53cf871bf4..227bf05fd8a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java @@ -30,7 +30,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.process.sharedmemoryfile.DefaultProcessCommands; import org.sonar.process.ProcessEntryPoint; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java index 62994f1e503..002d03aba0f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java @@ -24,7 +24,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.web.UserRole; import org.sonar.ce.queue.CeQueue; import org.sonar.ce.queue.CeQueueImpl; diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java index b2b26d951a7..319683819e6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java @@ -33,7 +33,7 @@ import org.elasticsearch.common.settings.Settings; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.server.es.IndexType.IndexMainType; diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java index de10b8e1905..515056beb85 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.mockito.Mockito; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.server.es.metadata.MetadataIndex; import org.sonar.server.es.metadata.MetadataIndexImpl; import org.sonar.server.es.newindex.FakeIndexDefinition; diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java index 4f6633793b6..8394828fffe 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java @@ -27,7 +27,7 @@ import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.common.collect.ImmutableOpenMap; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.server.platform.db.migration.es.MigrationEsClient; diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java index cad24375750..9c898e9611e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java @@ -35,9 +35,9 @@ import org.junit.rules.DisableOnDebug; import org.junit.rules.TestRule; import org.junit.rules.Timeout; import org.sonar.api.config.Configuration; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.MessageException; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.db.DbSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java index 4e278877bad..c0a61c8f573 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java @@ -26,7 +26,7 @@ import java.util.Random; import java.util.stream.Collectors; import org.junit.Test; import org.picocontainer.ComponentAdapter; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.platform.Server; import org.sonar.api.utils.System2; import org.sonar.core.platform.ComponentContainer; diff --git a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java index 72366851eb6..015d5f62db7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java @@ -26,7 +26,7 @@ import java.util.stream.IntStream; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.platform.Server; import org.sonar.process.NetworkUtils; import org.sonar.process.cluster.health.NodeDetails; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java index 91ef4b62709..f103c91017e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java @@ -28,7 +28,7 @@ import org.sonar.api.rules.RuleType; import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.Duration; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.DefaultIssueComment; import org.sonar.core.issue.IssueChangeContext; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java index 62bd3b09a36..e46f938784c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java @@ -27,7 +27,7 @@ import org.sonar.api.issue.Issue; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java index bbf2838cea6..e72f44a18b7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java @@ -25,7 +25,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java index 94e91c80676..7bdb1edfdae 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java @@ -32,7 +32,7 @@ import org.junit.rules.ExpectedException; import org.sonar.api.issue.Issue; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java index 426243cd7d6..46ba1e80a12 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java @@ -30,7 +30,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.server.es.EsTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java index 577c835d490..facee47775b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java @@ -30,7 +30,7 @@ import org.sonar.api.issue.Issue; import org.sonar.api.rule.Severity; import org.sonar.api.rules.RuleType; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java index ae7f70540a8..e5c1ec193dd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java @@ -30,7 +30,7 @@ import org.junit.rules.ExpectedException; import org.sonar.api.issue.Issue; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java index 336d049ba05..e34a915f808 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java @@ -34,7 +34,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.issue.Issue; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java index 412b3311037..aa81a36fdc9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java @@ -24,7 +24,7 @@ import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java index edcfca9ce0f..d4d4bc6375e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java @@ -33,7 +33,7 @@ import org.mockito.ArgumentCaptor; import org.sonar.api.rules.RuleType; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.BranchType; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java index 9634f8ee931..4c755e96cbc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java @@ -28,7 +28,7 @@ import org.mockito.ArgumentCaptor; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java index 9a4bacc317d..6f97d04f0e3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java @@ -25,7 +25,7 @@ import java.util.Date; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Languages; import org.sonar.api.resources.Qualifiers; import org.sonar.api.rule.RuleKey; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java index 1d5d65750a9..1d5abf53edc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java @@ -26,7 +26,7 @@ import java.util.stream.IntStream; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Languages; import org.sonar.api.rules.RuleType; import org.sonar.api.server.ws.WebService; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java index 07ded448839..d1287a495f3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java @@ -28,7 +28,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Languages; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rules.RuleType; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java index b029c512d7e..a12c5715697 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java @@ -26,7 +26,7 @@ import java.util.Arrays; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Languages; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.Durations; diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java index 872c5777b2c..63257d007b9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java @@ -23,7 +23,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.measure.custom.CustomMeasureDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java index df8fff10315..1dc8030a294 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java @@ -35,7 +35,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.sonar.api.config.PropertyDefinitions; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Metric; import org.sonar.api.resources.Qualifiers; diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java index 8a24e6b092c..7d7fb37fc96 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java @@ -26,7 +26,7 @@ import org.mockito.InOrder; import org.mockito.Mockito; import org.mockito.verification.Timeout; import org.sonar.api.config.PropertyDefinitions; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.notifications.Notification; import static java.util.Collections.singleton; diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java index a8d6d52544d..7e343ea2f28 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java @@ -19,18 +19,15 @@ */ package org.sonar.server.notification; -import com.google.common.collect.Sets; -import java.util.Arrays; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.sonar.api.config.PropertyDefinitions; import org.sonar.api.config.Settings; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.notifications.Notification; import org.sonar.api.notifications.NotificationChannel; import org.sonar.db.DbClient; -import org.sonar.db.property.PropertiesDao; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java index a6354115e83..89f6bc086f4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java @@ -20,7 +20,7 @@ package org.sonar.server.notification.ws; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.notifications.NotificationChannel; import org.sonar.server.issue.notification.FPOrWontFixNotificationHandler; import org.sonar.server.issue.notification.MyNewIssuesNotificationHandler; diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java index 75720a17016..58474092b70 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java @@ -27,11 +27,11 @@ import org.apache.commons.lang.RandomStringUtils; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceTypes; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.web.UserRole; import org.sonar.core.config.CorePropertyDefinitions; import org.sonar.core.permission.GlobalPermissions; diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java index 93f3479c185..760a904b9be 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java @@ -26,12 +26,12 @@ import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceTypes; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.web.UserRole; import org.sonar.core.permission.GlobalPermissions; import org.sonar.core.util.UuidFactoryFast; diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java index ce3eaed9160..9946f312fd4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java @@ -20,7 +20,7 @@ package org.sonar.server.organization.ws; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.ComponentContainer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java index 88ae06abbc8..c859ea7c39d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java @@ -24,9 +24,9 @@ import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceTypes; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.api.web.UserRole; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java b/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java index 2dfe93c4c29..71ad3c3bb93 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java @@ -19,7 +19,7 @@ */ package org.sonar.server.permission.index; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.server.es.Index; import org.sonar.server.es.IndexDefinition; import org.sonar.server.es.IndexType; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java index ac233f2d622..a6516b61993 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java @@ -22,8 +22,8 @@ package org.sonar.server.permission.ws; import org.junit.Before; import org.junit.Rule; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.resources.Qualifiers; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.ResourceTypesRule; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java index 80843e037bb..0efc112c1d8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.permission.ws.template; import javax.annotation.Nullable; import org.junit.Test; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.permission.template.PermissionTemplateDto; import org.sonar.server.exceptions.BadRequestException; import org.sonar.server.exceptions.ForbiddenException; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java index afcca28802a..a0eeba405a5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java @@ -25,8 +25,8 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.resources.Qualifiers; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.api.web.UserRole; import org.sonar.db.DbClient; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java index 3de7281760b..ce8e98ccb7e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java @@ -23,7 +23,7 @@ import java.util.Optional; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.MessageException; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java index 812b3d9254b..04cab75b384 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java @@ -22,7 +22,7 @@ package org.sonar.server.platform; import org.junit.Rule; import org.junit.Test; import org.sonar.api.config.Settings; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java index 7e30958d539..3d149ac81b4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java @@ -20,7 +20,7 @@ package org.sonar.server.platform.db; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.System2; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java index 5672b7b60cf..3f3520c4893 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java @@ -31,7 +31,7 @@ import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.junit.rules.TestRule; import org.junit.rules.Timeout; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.System2; import org.sonar.api.utils.log.LogTester; import org.sonar.process.NetworkUtilsImpl; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java index 5860ed73671..d1010a5ad2a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java @@ -24,7 +24,7 @@ import org.sonar.api.PropertyType; import org.sonar.api.config.PropertyDefinition; import org.sonar.api.config.PropertyDefinitions; import org.sonar.api.config.Settings; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo; import static org.apache.commons.lang.StringUtils.repeat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java index bc233dab4e9..1c4495f1a95 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.platform.monitoring; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.platform.Server; import org.sonar.api.security.SecurityRealm; import org.sonar.api.utils.log.LoggerLevel; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java index 3b06b895c33..2f87bef1aad 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java @@ -27,7 +27,7 @@ import javax.annotation.Nullable; import org.junit.Test; import org.junit.runner.RunWith; import org.picocontainer.ComponentAdapter; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.ComponentContainer; import org.sonar.server.platform.WebServer; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java index f12c7461f1e..adffc0b91a2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java @@ -21,7 +21,7 @@ package org.sonar.server.platform.monitoring.cluster; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.platform.Server; import org.sonar.api.security.SecurityRealm; import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java index 9fdb245d475..9e3d15d6c71 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.platform.monitoring.cluster; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.platform.Server; import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo; import org.sonar.server.platform.OfficialDistribution; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java index 3756ca14b58..a256be06728 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java @@ -29,7 +29,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.sonar.api.config.Configuration; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.ServerId; import org.sonar.core.util.UuidFactory; import org.sonar.core.util.Uuids; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java index 0875ad0fcb2..22a4550d8d5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java @@ -30,7 +30,7 @@ import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.sonar.api.CoreProperties; import org.sonar.api.SonarQubeSide; -import org.sonar.api.internal.SonarRuntimeImpl; +import org.sonar.api.impl.context.SonarRuntimeImpl; import org.sonar.api.utils.System2; import org.sonar.api.utils.Version; import org.sonar.core.platform.ServerId; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java index 5551c269c15..f9bf7d29a92 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java @@ -26,7 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.stubbing.Answer; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.server.platform.OfficialDistribution; import org.sonar.server.platform.Platform; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java index 5f52cee93c1..d07cb6a34c8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java @@ -27,7 +27,7 @@ import javax.annotation.Nullable; import org.junit.Test; import org.junit.runner.RunWith; import org.picocontainer.ComponentAdapter; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.ComponentContainer; import org.sonar.server.platform.WebServer; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java index bc353f99778..cfd4360fcfd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java @@ -29,7 +29,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.PluginInfo; import static org.assertj.core.api.Assertions.assertThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java index b1e50cba77c..6bd1c7dba91 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java @@ -24,7 +24,7 @@ import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import org.junit.Before; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.SonarException; import org.sonar.api.utils.UriReader; import org.sonar.process.ProcessProperties; diff --git a/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java index 383177f51c8..4b558c8ce92 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java @@ -20,8 +20,8 @@ package org.sonar.server.project.ws; import org.junit.Test; -import org.sonar.api.config.internal.ConfigurationBridge; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.ConfigurationBridge; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.ComponentContainer; import org.sonar.process.ProcessProperties; diff --git a/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java index af66710a957..0013337d241 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java @@ -22,7 +22,6 @@ package org.sonar.server.project.ws; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.WebService; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java index ba56ae7b267..76d1c9facf6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Metric; import org.sonar.api.utils.System2; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java index f35fb4cd915..c5e0685517c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java @@ -24,11 +24,11 @@ import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.rule.Severity; import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition; import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.NewBuiltInQualityProfile; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.core.util.SequenceUuidFactory; import org.sonar.core.util.UuidFactory; import org.sonar.db.DbSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java index f15fe281fca..ee0f3fbfae8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java @@ -33,7 +33,7 @@ import org.sonar.api.rules.RulePriority; import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition; import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.NewBuiltInQualityProfile; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.qualityprofile.ActiveRuleDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java index d796ff9e6fd..d87e2b3fc72 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java @@ -25,7 +25,7 @@ import java.util.Random; import org.assertj.core.groups.Tuple; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.notifications.Notification; import org.sonar.api.resources.Language; import org.sonar.api.resources.Languages; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java index 6f3f63dba08..6bf85ee8932 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java @@ -29,9 +29,9 @@ import java.util.List; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java index b5be108fc50..a084f72f5b6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java @@ -28,9 +28,9 @@ import org.apache.commons.io.IOUtils; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; +import org.sonar.api.impl.utils.JUnitTempFolder; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; -import org.sonar.api.utils.internal.JUnitTempFolder; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java index b6c2221b9c4..dd57f191db2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java @@ -28,6 +28,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.profiles.ProfileExporter; import org.sonar.api.profiles.ProfileImporter; import org.sonar.api.profiles.RulesProfile; @@ -36,7 +37,6 @@ import org.sonar.api.rules.RuleFinder; import org.sonar.api.rules.RulePriority; import org.sonar.api.utils.System2; import org.sonar.api.utils.ValidationMessages; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.qualityprofile.QProfileDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java index bdf494dde38..176bddc24c6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java @@ -27,9 +27,9 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.core.util.SequenceUuidFactory; import org.sonar.core.util.Uuids; import org.sonar.db.DbSession; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java index f2c5e27eafc..b53733b9cd1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java @@ -22,8 +22,8 @@ package org.sonar.server.qualityprofile; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbTester; import org.sonar.db.qualityprofile.ActiveRuleKey; import org.sonar.db.qualityprofile.OrgActiveRuleDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java index 97c24b81ba1..c2c813f10d8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java @@ -30,10 +30,10 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.PropertyType; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbTester; import org.sonar.db.qualityprofile.ActiveRuleParamDto; import org.sonar.db.qualityprofile.OrgActiveRuleDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java index cfee6896258..77e3fcc903e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java @@ -26,10 +26,10 @@ import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbTester; import org.sonar.db.qualityprofile.ActiveRuleParamDto; import org.sonar.db.qualityprofile.OrgActiveRuleDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java index ec409c97cd2..6b7d6a6dd73 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java @@ -26,9 +26,9 @@ import java.util.Optional; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.resources.Language; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.core.util.UuidFactoryFast; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java index 865b237d917..7c8b2b93bcc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java @@ -31,7 +31,7 @@ import org.sonar.api.resources.Languages; import org.sonar.api.rule.RuleKey; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.DateUtils; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; import org.sonar.db.qualityprofile.QProfileChangeDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java index 7de05d6229c..8551cdcb44f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java @@ -25,10 +25,10 @@ import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.JUnitTempFolder; import org.sonar.api.resources.Languages; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.JUnitTempFolder; import org.sonar.core.util.SequenceUuidFactory; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java index 8320116e216..2a4d83ccc9c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.resources.Languages; import org.sonar.api.server.ws.WebService; -import org.sonar.api.server.ws.internal.SimpleGetRequest; +import org.sonar.api.impl.ws.SimpleGetRequest; import org.sonar.server.ws.WsTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java index 366119aa08c..6c19c1a0ef0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java @@ -26,11 +26,11 @@ import java.util.Random; import java.util.function.Consumer; import org.junit.Before; import org.junit.Test; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.rule.RuleKey; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RuleQuery; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java index 3637ea75755..2f55c987a57 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java @@ -36,6 +36,7 @@ import org.sonar.api.server.debt.DebtRemediationFunction; import org.sonar.api.server.rule.RulesDefinition; import org.sonar.api.utils.ValidationMessages; import org.sonar.core.i18n.RuleI18nManager; +import org.sonar.api.impl.server.RuleDefinitionContext; import org.sonar.server.debt.DebtModelPluginRepository; import org.sonar.server.debt.DebtModelXMLExporter; import org.sonar.server.debt.DebtRulesXMLImporter; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java index e2b547cf151..2be421542b4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java @@ -25,7 +25,7 @@ import org.junit.rules.ExpectedException; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; -import org.sonar.api.server.ws.internal.SimpleGetRequest; +import org.sonar.api.impl.ws.SimpleGetRequest; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java index e1272f7aa5e..8384d7176f0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java @@ -27,6 +27,7 @@ import org.assertj.core.api.iterable.Extractor; import org.junit.Before; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.resources.Languages; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; @@ -34,7 +35,6 @@ import org.sonar.api.rules.RuleType; import org.sonar.api.server.debt.DebtRemediationFunction; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.core.util.stream.MoreCollectors; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java index bb86e37ce02..d8064914819 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java @@ -27,8 +27,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.config.Encryption; -import org.sonar.api.config.Settings; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.ws.WebService; import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.tester.UserSessionRule; diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java index 59acdbde22f..230264e218c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java @@ -28,7 +28,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.config.Encryption; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.ws.WebService; import org.sonar.server.exceptions.BadRequestException; import org.sonar.server.exceptions.ForbiddenException; diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java index e49e7914437..56930de1154 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java @@ -27,13 +27,11 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.config.Encryption; -import org.sonar.api.config.Settings; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.ws.WebService; import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.tester.UserSessionRule; import org.sonar.server.ws.WsActionTester; -import org.sonarqube.ws.MediaTypes; import org.sonarqube.ws.Settings.GenerateSecretKeyWsResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java index bd778c40aed..07b05d46f3e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java @@ -32,7 +32,7 @@ import org.sonar.api.config.Configuration; import org.sonar.api.config.PropertyDefinition; import org.sonar.api.config.PropertyDefinitions; import org.sonar.api.config.PropertyFieldDefinition; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; import org.sonar.api.web.UserRole; diff --git a/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java index 60944a2a608..f3266fade4e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java @@ -26,7 +26,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; import org.sonar.api.config.Configuration; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.component.ComponentDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java index 60fdc81e5d6..9dc9c216651 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java @@ -26,7 +26,7 @@ import okhttp3.Request; import okio.Buffer; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.RETURNS_DEEP_STUBS; diff --git a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java index 227aff02c15..197b196328f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java @@ -29,9 +29,8 @@ import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.mockito.internal.matchers.Any; -import org.sonar.api.config.internal.MapSettings; -import org.sonar.api.utils.internal.TestSystem2; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.core.platform.EditionProvider; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java index 1a20d2e87fe..c55f40f90b6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.ui.ws; import java.util.Optional; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.platform.Server; import org.sonar.api.resources.ResourceType; import org.sonar.api.resources.ResourceTypeTree; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java index 03d177395e2..cb92f591fdc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java @@ -21,7 +21,7 @@ package org.sonar.server.ui.ws; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.web.page.Page; import org.sonar.api.web.page.PageDefinition; import org.sonar.core.platform.PluginInfo; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java index d680692abd6..9abfeb01669 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java @@ -21,7 +21,7 @@ package org.sonar.server.user; import org.junit.Test; import org.sonar.api.CoreProperties; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.security.LoginPasswordAuthenticator; import org.sonar.api.security.SecurityRealm; import org.sonar.api.utils.SonarException; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java index 352070eacf3..8b86153904b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java @@ -22,7 +22,7 @@ package org.sonar.server.user; import org.junit.After; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.server.ws.TestRequest; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java index af9a0eca653..2b111c3a9e0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java @@ -28,10 +28,10 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.platform.NewUserHandler; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java index 2d8d686a8f2..7bf516e79c5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java @@ -23,9 +23,9 @@ import com.google.common.collect.Multimap; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java index 8bd07c24f8a..f10ac9b212d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java @@ -25,9 +25,9 @@ import org.elasticsearch.search.SearchHit; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java index a20573fc2ca..0c5915c47f7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java @@ -23,10 +23,10 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbTester; import org.sonar.server.authentication.CredentialsLocalAuthentication; import org.sonar.server.es.EsTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java index 3cf1855426d..c8a60f681d8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java @@ -25,10 +25,10 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.core.config.CorePropertyDefinitions; import org.sonar.db.DbTester; import org.sonar.db.user.GroupDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java index 38de2bb71af..cd3bb4523da 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java @@ -22,7 +22,7 @@ package org.sonar.server.user.ws; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceType; import org.sonar.api.resources.ResourceTypeTree; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java index fc3c15eae83..b1d23d8eee5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java @@ -23,7 +23,7 @@ import java.util.Collections; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceType; import org.sonar.api.resources.ResourceTypeTree; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java index 54aac993829..2f7bebc48fb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java @@ -24,8 +24,8 @@ import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.utils.System2; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java index 1da5327451a..498bf6adedb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java @@ -21,7 +21,7 @@ package org.sonar.server.user.ws; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.db.DbTester; import org.sonar.server.organization.TestOrganizationFlags; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java index 8901a4c7dd5..40bcb63f881 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java index c7f89fc8e42..b5696869de2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.user.ws; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.MapSettings; import org.sonar.api.server.ws.WebService; import org.sonar.api.server.ws.WebService.Param; import org.sonar.api.utils.System2; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java index 1fbd80a8f78..50ce373b592 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java @@ -20,8 +20,8 @@ package org.sonar.server.user.ws; import org.junit.Test; -import org.sonar.api.config.internal.ConfigurationBridge; -import org.sonar.api.config.internal.MapSettings; +import org.sonar.api.impl.config.ConfigurationBridge; +import org.sonar.api.impl.config.MapSettings; import org.sonar.core.platform.ComponentContainer; import org.sonar.process.ProcessProperties; diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java index 1b73b2ba8b5..5050def00f0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.usergroups.ws; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; import org.sonar.db.user.GroupDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java index a98bbe1085d..7d96370e5cf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.usergroups.ws; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.api.web.UserRole; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDbTester; diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java index 7e738bec02e..72d8529dbb6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.usergroups.ws; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.utils.internal.AlwaysIncreasingSystem2; +import org.sonar.api.impl.utils.AlwaysIncreasingSystem2; import org.sonar.core.permission.GlobalPermissions; import org.sonar.db.DbTester; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java index 6313f12b811..aea0e0d69bd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java @@ -34,8 +34,8 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import org.apache.commons.io.IOUtils; -import org.sonar.api.server.ws.internal.PartImpl; -import org.sonar.api.server.ws.internal.ValidatingRequest; +import org.sonar.api.impl.ws.PartImpl; +import org.sonar.api.impl.ws.ValidatingRequest; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java index 1e58673735d..c3e7f7e1596 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java @@ -32,7 +32,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.SonarQubeSide; import org.sonar.api.SonarRuntime; -import org.sonar.api.internal.SonarRuntimeImpl; +import org.sonar.api.impl.context.SonarRuntimeImpl; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.RequestHandler; import org.sonar.api.server.ws.Response; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java index fdd896fec52..e69153b5033 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java @@ -37,8 +37,8 @@ import javax.annotation.Nullable; import org.apache.commons.io.IOUtils; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; -import org.sonar.api.server.ws.internal.PartImpl; -import org.sonar.api.server.ws.internal.ValidatingRequest; +import org.sonar.api.impl.ws.PartImpl; +import org.sonar.api.impl.ws.ValidatingRequest; import org.sonar.api.utils.text.JsonWriter; import org.sonar.api.utils.text.XmlWriter; import org.sonar.server.ws.WsTester.TestResponse.TestStream; |