aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common
diff options
context:
space:
mode:
authorBelen Pruvost <belen.pruvost@sonarsource.com>2021-08-16 16:55:23 +0200
committersonartech <sonartech@sonarsource.com>2021-08-19 20:08:15 +0000
commit8278254af1aa48b99348156ca7cab139ff8b783b (patch)
tree67acd907e404cb9057eb9fafdef58b1e17e2a6f8 /server/sonar-server-common
parent9fd499fa98ca1c643b45d5a7d96aeb6fd09a999c (diff)
downloadsonarqube-8278254af1aa48b99348156ca7cab139ff8b783b.tar.gz
sonarqube-8278254af1aa48b99348156ca7cab139ff8b783b.zip
SONAR-15142 - Add component qualifier to new value in Logs
Diffstat (limited to 'server/sonar-server-common')
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/favorite/FavoriteUpdater.java4
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/favorite/FavoriteUpdater.java b/server/sonar-server-common/src/main/java/org/sonar/server/favorite/FavoriteUpdater.java
index 6deb01b0806..e5abb245540 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/favorite/FavoriteUpdater.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/favorite/FavoriteUpdater.java
@@ -63,7 +63,7 @@ public class FavoriteUpdater {
.setComponentUuid(componentDto.uuid())
.setUserUuid(userUuid),
userLogin,
- componentDto.name());
+ componentDto.name(), componentDto.qualifier());
}
/**
@@ -80,7 +80,7 @@ public class FavoriteUpdater {
.setKey(PROP_FAVORITE_KEY)
.setComponentUuid(component.uuid())
.setUserUuid(userUuid),
- userLogin, component.name());
+ userLogin, component.name(), component.qualifier());
checkArgument(result == 1, "Component '%s' is not a favorite", component.getDbKey());
}
}
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java
index 0851cd9b1ba..74a37ad19a6 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java
@@ -102,7 +102,7 @@ public class StartupMetadataProviderTest {
private void testLoadingFromDatabase(SonarRuntime runtime, boolean isStartupLeader) {
dbTester.properties().insertProperty(new PropertyDto().setKey(CoreProperties.SERVER_STARTTIME).setValue(formatDateTime(A_DATE)),
- null, null);
+ null, null, null);
when(webServer.isStartupLeader()).thenReturn(isStartupLeader);
StartupMetadata metadata = underTest.provide(system, runtime, webServer, dbTester.getDbClient());