diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-08-17 14:35:44 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-08-26 20:04:29 +0000 |
commit | 79b13ac2a166eea535deceade405e8b99b098c64 (patch) | |
tree | 0e979a6eebb7119d74b780a38dc387af5325ffe3 /server/sonar-webserver | |
parent | 680aed78d5a58249ae56ca36b5f495bb579bce1a (diff) | |
download | sonarqube-79b13ac2a166eea535deceade405e8b99b098c64.tar.gz sonarqube-79b13ac2a166eea535deceade405e8b99b098c64.zip |
SONAR-15142 Always add AuditPersister to container and use typed NewValue for each audit
Diffstat (limited to 'server/sonar-webserver')
-rw-r--r-- | server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java index d16a642d366..4bd1c1d4c69 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java @@ -29,6 +29,8 @@ import org.sonar.api.internal.MetadataLoader; import org.sonar.api.internal.SonarRuntimeImpl; import org.sonar.api.utils.System2; import org.sonar.api.utils.Version; +import org.sonar.db.audit.AuditPersister; +import org.sonar.db.audit.NoOpAuditPersister; import org.sonar.server.issue.index.IssueIndexSyncProgressChecker; import org.sonar.server.platform.DockerSupportImpl; import org.sonar.server.util.GlobalLockManagerImpl; @@ -162,6 +164,9 @@ public class PlatformLevel1 extends PlatformLevel { .load(); get(WebCoreExtensionsInstaller.class) .install(getContainer(), hasPlatformLevel(1), noAdditionalSideFilter()); + if (getOptional(AuditPersister.class).isEmpty()) { + add(NoOpAuditPersister.class); + } return super.start(); } |