]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6315 fix missing rule caching in DefinedQProfileCreation 2024/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 2 May 2017 14:43:45 +0000 (16:43 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 9 May 2017 07:28:10 +0000 (09:28 +0200)
server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/CachingDefinedQProfileCreation.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/CachingDefinedQProfileCreationImpl.java [new file with mode: 0644]

index 8de7a20447717a52128dc438820d2676eee2974f..2359dbb98118f5ab36091419599f7d45d16a14b6 100644 (file)
@@ -25,6 +25,7 @@ import org.sonar.server.organization.DefaultOrganizationEnforcer;
 import org.sonar.server.platform.ServerLifecycleNotifier;
 import org.sonar.server.platform.web.RegisterServletFilters;
 import org.sonar.server.qualitygate.RegisterQualityGates;
+import org.sonar.server.qualityprofile.CachingDefinedQProfileCreationImpl;
 import org.sonar.server.qualityprofile.CachingRuleActivator;
 import org.sonar.server.qualityprofile.CachingRuleActivatorContextFactory;
 import org.sonar.server.qualityprofile.DefinedQProfileLoader;
@@ -59,6 +60,7 @@ public class PlatformLevelStartup extends PlatformLevel {
     addIfStartupLeader(
       CachingRuleActivatorContextFactory.class,
       CachingRuleActivator.class,
+      CachingDefinedQProfileCreationImpl.class,
       RegisterQualityProfiles.class,
       RegisterPermissionTemplates.class,
       RenameDeprecatedPropertyKeys.class,
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/CachingDefinedQProfileCreation.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/CachingDefinedQProfileCreation.java
new file mode 100644 (file)
index 0000000..427672e
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 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.server.qualityprofile;
+
+public interface CachingDefinedQProfileCreation extends DefinedQProfileCreation {
+}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/CachingDefinedQProfileCreationImpl.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/CachingDefinedQProfileCreationImpl.java
new file mode 100644 (file)
index 0000000..1d4e755
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 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.server.qualityprofile;
+
+import org.sonar.db.DbClient;
+
+public class CachingDefinedQProfileCreationImpl extends DefinedQProfileCreationImpl implements CachingDefinedQProfileCreation {
+  public CachingDefinedQProfileCreationImpl(DbClient dbClient, QProfileFactory profileFactory, CachingRuleActivator ruleActivator) {
+    super(dbClient, profileFactory, ruleActivator);
+  }
+}