diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java index 6209b00b976a..3f4003019cfa 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java @@ -488,17 +488,17 @@ private Set insertProjects(int number) { .collect(Collectors.toSet()); } - private Consumer configureLiveMeasure(String language, MetricDto metric, ProjectDto project, ComponentDto componentDto) { + private Consumer configureLiveMeasure(String language, MetricDto metric, ComponentDto componentDto) { return liveMeasure -> liveMeasure .setMetricUuid(metric.getUuid()) .setComponentUuid(componentDto.uuid()) - .setProjectUuid(project.getUuid()) + .setProjectUuid(componentDto.uuid()) .setData(language + "=" + random.nextInt(10)); } private Consumer insertLiveMeasure(String language, MetricDto metric) { return (projectData) -> db.measures().insertLiveMeasure(projectData.getMainBranchComponent(), metric, - configureLiveMeasure(language, metric, projectData.getProjectDto(), projectData.getMainBranchComponent())); + configureLiveMeasure(language, metric, projectData.getMainBranchComponent())); } private void insertProjectsLiveMeasures(String language, Set projects) { diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml index abfd58f2f88b..575a4356117e 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml @@ -129,15 +129,15 @@