aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorMichal Duda <michal.duda@sonarsource.com>2019-06-07 12:25:22 +0200
committerSonarTech <sonartech@sonarsource.com>2019-08-12 20:21:13 +0200
commit05c8a2e004e9cc17a4d5963a42c835753eefb367 (patch)
tree2f70ae5589ff39d9f8532c1e628947784a1f9306 /sonar-plugin-api/src
parent21805ac1812e1db25ea1b8267593c6893b367fb4 (diff)
downloadsonarqube-05c8a2e004e9cc17a4d5963a42c835753eefb367.tar.gz
sonarqube-05c8a2e004e9cc17a4d5963a42c835753eefb367.zip
SONAR-12197 completely drop "sonar.branch" code
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java6
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java23
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java30
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java5
4 files changed, 2 insertions, 62 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
index 4f2dbe91fa1..6f693c89334 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
@@ -139,12 +139,6 @@ public interface CoreProperties {
/* Global settings */
String SONAR_HOME = "SONAR_HOME";
- /**
- * @deprecated since 6.7. This feature is deprecated in favor of the new branch feature.
- * @see <a href="https://redirect.sonarsource.com/doc/branches.html">https://redirect.sonarsource.com/doc/branches.html/a>
- */
- @Deprecated
- String PROJECT_BRANCH_PROPERTY = "sonar.branch";
String PROJECT_VERSION_PROPERTY = "sonar.projectVersion";
String BUILD_STRING_PROPERTY = "sonar.buildString";
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
index 2dbdd8d2fb0..40d293da8de 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
@@ -167,29 +167,6 @@ public class ProjectDefinition {
}
/**
- * @since 4.5
- */
- public String getKeyWithBranch() {
- String branch = getBranch();
- String projectKey = getKey();
- if (StringUtils.isNotBlank(branch)) {
- projectKey = String.format("%s:%s", projectKey, branch);
- }
- return projectKey;
- }
-
- @CheckForNull
- public String getBranch() {
- String branch = properties.get(CoreProperties.PROJECT_BRANCH_PROPERTY);
- if (StringUtils.isNotBlank(branch)) {
- return branch;
- } else if (parent != null) {
- return parent.getBranch();
- }
- return null;
- }
-
- /**
* @deprecated since 7.7, use {@link #getOriginalProjectVersion()} instead
*/
@Deprecated
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java
deleted file mode 100644
index a1e4f2661c0..00000000000
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectKey.java
+++ /dev/null
@@ -1,30 +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.api.batch.bootstrap;
-
-/**
- * Provides root project key with branch
- * @deprecated since 7.6
- */
-@Deprecated
-@FunctionalInterface
-public interface ProjectKey {
- String get();
-}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java
index 1883e060151..8fe47237acf 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java
@@ -19,10 +19,9 @@
*/
package org.sonar.api.batch.bootstrap;
-import org.sonar.api.scanner.ScannerSide;
-
import java.util.ArrayList;
import java.util.List;
+import org.sonar.api.scanner.ScannerSide;
/**
* Mutable project definitions that can be modified by {@link ProjectBuilder} extensions.
@@ -73,7 +72,7 @@ public class ProjectReactor {
public String get() {
if (root != null) {
- return root.getKeyWithBranch();
+ return root.getKey();
}
return null;
}