]> source.dussan.org Git - sonarqube.git/commitdiff
fix some quality flaws (UT coverage and useless imports)
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 20 Oct 2016 07:47:11 +0000 (09:47 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 20 Oct 2016 15:17:54 +0000 (17:17 +0200)
server/sonar-server/src/main/java/org/sonar/server/organization/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/root/ws/SearchAction.java

index be7c4c738ccda96201273ea0855bbb73a42acc07..c08e4f2be834be977cf88fb5907cdac1abffaf17 100644 (file)
@@ -26,7 +26,6 @@ import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.core.config.CorePropertyDefinitions;
-import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.core.util.UuidFactory;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
index 76fe456ea9e02918bb5888bd8fadf5e6382fcaea..4b2616043d1c97af3ce6f37291dc4905c815e027 100644 (file)
@@ -76,9 +76,7 @@ public class SearchAction implements RootsWsAction {
 
   private static WsRoot.Root toRoot(WsRoot.Root.Builder builder, UserDto dto) {
     builder.clear();
-    if (dto.getLogin() != null) {
-      builder.setLogin(dto.getLogin());
-    }
+    builder.setLogin(dto.getLogin());
     if (dto.getName() != null) {
       builder.setName(dto.getName());
     }