]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17352 Refactor component keys to not include branch suffix
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>
Thu, 6 Oct 2022 08:40:32 +0000 (10:40 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 12 Oct 2022 20:03:44 +0000 (20:03 +0000)
server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesDao.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/ShowAction.java

index ae54ec9fd17060f334dbe3a017cae054294d3d7b..2b4faf0ec447c4e8daefeed92746b42f993530c8 100644 (file)
@@ -42,7 +42,6 @@ import org.sonar.db.audit.AuditPersister;
 import org.sonar.db.audit.model.PropertyNewValue;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static java.util.Collections.emptyList;
 import static java.util.Collections.singletonList;
 import static org.apache.commons.lang.StringUtils.repeat;
 import static org.sonar.db.DatabaseUtils.executeLargeInputs;
@@ -152,13 +151,13 @@ public class PropertiesDao implements Dao {
     }
   }
 
-  public List<PropertyDto> selectComponentProperties(DbSession session, String uuid) {
-    return getMapper(session).selectByComponentUuids(singletonList(uuid));
+  public List<PropertyDto> selectComponentProperties(DbSession session, String componentUuid) {
+    return getMapper(session).selectByComponentUuids(singletonList(componentUuid));
   }
 
-  public List<PropertyDto> selectComponentProperties(String uuid) {
+  public List<PropertyDto> selectComponentProperties(String componentUuid) {
     try (DbSession session = mybatis.openSession(false)) {
-      return selectComponentProperties(session, uuid);
+      return selectComponentProperties(session, componentUuid);
     }
   }
 
index ca42f019916b811201cbaa202781dff1e7db7eac..f7525e9e56d45728afb2a0bbafefbc8c3288e66e 100644 (file)
@@ -157,7 +157,7 @@ public class ShowAction implements ComponentsWsAction {
         String branch = dbClient.branchDao().selectByUuid(dbSession, component.getCopyComponentUuid())
           .map(BranchDto::getKey)
           .orElse(null);
-        componentDtoToWsComponent(component, parentProject.orElse(null), lastAnalysis, branch, null)
+        return componentDtoToWsComponent(component, parentProject.orElse(null), lastAnalysis, branch, null)
           .setNeedIssueSync(needIssueSync);
       }
       return componentDtoToWsComponent(component, parentProject.orElse(null), lastAnalysis, request.branch, request.pullRequest)