]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Remove generic code smells
authorMatteo Mara <matteo.mara@sonarsource.com>
Thu, 30 Mar 2023 14:16:34 +0000 (16:16 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 30 Mar 2023 20:03:08 +0000 (20:03 +0000)
server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlSettings.java
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueTesting.java
server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/SettingsSection.java
server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/RemoveGroupActionIT.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/ce/queue/CeQueueCleaner.java

index d4a71907f60ff0fb08d158400f37cb102f81c39b..3da572ea2af1690e348a4ea93851f0eb26325bbd 100644 (file)
@@ -188,7 +188,8 @@ public class SamlSettings {
         .build(),
       PropertyDefinition.builder(GROUP_NAME_ATTRIBUTE)
         .name("SAML group attribute")
-        .description("Attribute defining the user groups in SAML, used to synchronize group memberships. If you leave this field empty, group memberships are managed locally by SonarQube administrators.")
+        .description("Attribute defining the user groups in SAML, used to synchronize group memberships. If you leave this field empty, " +
+          "group memberships are managed locally by SonarQube administrators.")
         .category(CATEGORY)
         .subCategory(SUBCATEGORY)
         .index(10)
index b4bce20d4cc326e8df5271063f90c3886106ccbd..88f6520476c91e16564597087546a5fc9764d996 100644 (file)
@@ -24,8 +24,6 @@ import org.apache.commons.lang.math.RandomUtils;
 import org.sonar.api.issue.Issue;
 import org.sonar.api.resources.Qualifiers;
 import org.sonar.api.rule.Severity;
-import org.sonar.api.rules.RuleType;
-import org.sonar.api.utils.DateUtils;
 import org.sonar.core.util.UuidFactoryFast;
 import org.sonar.core.util.Uuids;
 import org.sonar.db.component.ComponentDto;
index 5ba82ce31545e9c8556cf14cff5c349b1b1c31c5..8ed2a63d5970654b9c872320c37fe98489e98a4c 100644 (file)
@@ -91,7 +91,7 @@ public class SettingsSection implements SystemInfoSection, Global {
     return protobuf.build();
   }
 
-  private void includeSetting(Builder protobuf, PropertyDefinitions definitions, Entry<String, String> prop) {
+  private static void includeSetting(Builder protobuf, PropertyDefinitions definitions, Entry<String, String> prop) {
     String key = prop.getKey();
     String value = obfuscateValue(definitions, key, prop.getValue());
     setAttribute(protobuf, key, value);
index c8c4419e439b3e36376df8d17fdd1b46f24960c2..c82e1e50026169509cb50bf6c0a9bcd3e605523a 100644 (file)
@@ -153,8 +153,9 @@ public class RemoveGroupActionIT extends BasePermissionWsIT<RemoveGroupAction> {
     db.users().insertPermissionOnGroup(aGroup, GlobalPermission.PROVISION_PROJECTS);
     loginAsAdmin();
 
+    String administerPermission = GlobalPermission.ADMINISTER.getKey();
     assertThatThrownBy(() -> {
-      executeRequest(aGroup, GlobalPermission.ADMINISTER.getKey());
+      executeRequest(aGroup, administerPermission);
     })
       .isInstanceOf(BadRequestException.class)
       .hasMessage("Last group with permission 'admin'. Permission cannot be removed.");
index f59d99d528e41c6a05ff7a0e968558bce406f488..4d0400b28330ef22d16c52151154023fabb95f85 100644 (file)
@@ -21,7 +21,6 @@ package org.sonar.server.ce.queue;
 
 import java.util.List;
 import org.sonar.api.Startable;
-import org.sonar.api.config.Configuration;
 import org.sonar.api.platform.ServerUpgradeStatus;
 import org.sonar.api.server.ServerSide;
 import org.sonar.api.utils.log.Logger;