]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 23 May 2016 15:00:49 +0000 (17:00 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 23 May 2016 15:00:49 +0000 (17:00 +0200)
18 files changed:
server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java
server/sonar-server/src/main/java/org/sonar/server/computation/metric/MetricDtoToMetric.java
server/sonar-server/src/main/java/org/sonar/server/issue/filter/IssueFilterJsonWriter.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/GroupsAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsData.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/UsersAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/SearchTemplatesData.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/UpdateTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/SearchData.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java
sonar-db/src/main/java/org/sonar/db/user/GroupMembershipQuery.java
sonar-db/src/main/java/org/sonar/db/user/UserMembershipQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java
sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/pattern/AbstractPatternInitializer.java

index 74122a3920625ad42fdaa4bfb82989fff7216893..df6dbdd5010a125755477c520a23b7921a39e701 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.WsComponents.ShowWsResponse;
 import org.sonarqube.ws.client.component.ShowWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static java.lang.String.format;
 import static java.util.Collections.emptyList;
 import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
index 407eda1e2d11dd0bb5f97e2defc0704c341e21bc..6c318f50ce1e1d18f7b8e966d8ae39076383dc85 100644 (file)
@@ -51,7 +51,7 @@ import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.WsComponents.TreeWsResponse;
 import org.sonarqube.ws.client.component.TreeWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.collect.FluentIterable.from;
 import static com.google.common.collect.Sets.newHashSet;
 import static java.lang.String.format;
index 4f235fd89fbeaa1f4ebed87b84464c353bcea59c..de4e6e39ca6e4e49f682ab00a8bb9850cbcaad03 100644 (file)
@@ -24,7 +24,7 @@ import javax.annotation.Nonnull;
 import org.sonar.db.metric.MetricDto;
 import org.sonar.server.computation.measure.Measure;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 
 enum MetricDtoToMetric implements Function<MetricDto, Metric> {
   INSTANCE;
index cbc26d306390de1072f194d182bbf0d3672cfa00..31134c8d61b0715a68c4ca8b071f25f76b121733 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.db.issue.IssueFilterDto;
 import org.sonar.server.user.UserSession;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 
 class IssueFilterJsonWriter {
 
index ffe497b57b669ccf275a49ade610477eb1f48995..72bb2c58e7c860ef21b43bbb80f0bc8689862b55 100644 (file)
@@ -54,7 +54,7 @@ import org.sonarqube.ws.WsMeasures;
 import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
 import org.sonarqube.ws.client.measure.ComponentWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.collect.FluentIterable.from;
 import static java.lang.String.format;
 import static java.util.Collections.emptyList;
index 7397e2cfe6d443179402a3bff3ec75ff8f6ba945..d386def59a3fa644f568b7746801fce3d2181809 100644 (file)
@@ -59,7 +59,7 @@ import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.WsMeasures;
 import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.common.collect.FluentIterable.from;
 import static com.google.common.collect.Lists.newArrayList;
index c7359fcd7c5cbdd2a27c0a5a346e26852bc12d2a..bf11e1f98133047014c67445f7e588fad8518752 100644 (file)
@@ -39,7 +39,7 @@ import org.sonarqube.ws.WsPermissions.Group;
 import org.sonarqube.ws.WsPermissions.WsGroupsResponse;
 import org.sonarqube.ws.client.permission.GroupsWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkProjectAdminUserByComponentDto;
 import static org.sonar.server.permission.ws.PermissionQueryParser.fromSelectionModeToMembership;
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateGlobalPermission;
index a165fe5cf40df63ac36749dc2cddef0a0a524961..ffc42271422edbcc3c0b7f0a24657c2cfbd56e33 100644 (file)
@@ -28,7 +28,7 @@ import java.util.Set;
 import org.sonar.api.utils.Paging;
 import org.sonar.db.component.ComponentDto;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.common.collect.ImmutableList.copyOf;
 import static com.google.common.collect.ImmutableTable.copyOf;
index e5cdacac106b65d0510a30045be782c90147391a..1e8303d7b5434b9909a681e454a875b3c8dc45c0 100644 (file)
@@ -38,7 +38,7 @@ import org.sonarqube.ws.WsPermissions;
 import org.sonarqube.ws.WsPermissions.UsersWsResponse;
 import org.sonarqube.ws.client.permission.UsersWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Strings.nullToEmpty;
 import static org.sonar.api.utils.Paging.forPageIndex;
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkProjectAdminUserByComponentDto;
index 7c9d60e832ae2132c473c536022405645f672a17..79795d4a2e0bf6eebab1cb5cdcc9808f217e8b93 100644 (file)
@@ -27,7 +27,7 @@ import java.util.Set;
 import org.sonar.db.permission.PermissionTemplateDto;
 import org.sonar.server.permission.ws.template.DefaultPermissionTemplateFinder.TemplateUuidQualifier;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.common.collect.ImmutableList.copyOf;
 import static com.google.common.collect.ImmutableTable.copyOf;
index 9475c7bb550fe128e6aa3b2c94a6db0f941289ef..979147722e12f3f78c82505895858dd05d49e716 100644 (file)
@@ -36,7 +36,7 @@ import org.sonarqube.ws.WsPermissions.PermissionTemplate;
 import org.sonarqube.ws.WsPermissions.UpdateTemplateWsResponse;
 import org.sonarqube.ws.client.permission.UpdateTemplateWsRequest;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static java.lang.String.format;
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdminUser;
 import static org.sonar.server.permission.ws.PermissionRequestValidator.MSG_TEMPLATE_WITH_SAME_NAME;
index 876724aa8043ce03c5d739e19d5ef5e49dd73bb1..6910c34e5152ed209d57ea4457542ad79d9eb3e9 100644 (file)
@@ -23,7 +23,7 @@ import java.util.List;
 import java.util.Map;
 import org.sonar.server.qualityprofile.QProfile;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.collect.ImmutableList.copyOf;
 import static com.google.common.collect.ImmutableMap.copyOf;
 
index 4aae003f5efc695ded1329c71dcef50ba97d960e..7f9d97d310bfaa05303dddf0b1c161a1b9072f21 100644 (file)
@@ -40,7 +40,7 @@ import org.sonar.server.es.SearchResult;
 import org.sonar.server.user.index.UserDoc;
 import org.sonar.server.user.index.UserIndex;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static org.sonar.server.es.SearchOptions.MAX_LIMIT;
 
 public class SearchAction implements UsersWsAction {
index 17473174f893cd152fe7e2d8d91a594e2bbe7233..d2b535b16b2ca0188edb9e835368574387bc3248 100644 (file)
@@ -30,7 +30,7 @@ import org.jruby.RubyFile;
 import org.sonar.api.server.ws.internal.ValidatingRequest;
 import org.sonarqube.ws.MediaTypes;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static org.apache.commons.lang.StringUtils.substringAfterLast;
 
 public class ServletRequest extends ValidatingRequest {
index 1432d460bae328471a0ac541d2573f4614b44fc3..596c32d9366843389b66c41adeda6234fc48301d 100644 (file)
@@ -25,7 +25,7 @@ import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.apache.commons.lang.StringUtils;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 
index cde9d72b6516c39c0a1cd6c22fa07aed791bb63b..1252f9b4675ece6d5c67983ef3c600f82b5ee0e6 100644 (file)
@@ -25,7 +25,7 @@ import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.apache.commons.lang.StringUtils;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 
index 3400be34f186567968ceccfce45de5ae711fecb3..941fa5870224b815e14253606724c5ffd274e58e 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.api.batch.InstantiationStrategy;
 import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.server.ServerSide;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkArgument;
 import static org.apache.commons.lang.StringUtils.isNotBlank;
 
index a3e58803a71f79a95ac1512f8ffd8ea5dd304ad1..af6a0efe2286a027a7b1af11e021b3fef4f7235c 100644 (file)
@@ -27,7 +27,7 @@ import org.sonar.api.config.Settings;
 
 import java.util.List;
 
-import static com.google.common.base.Objects.firstNonNull;
+import static com.google.common.base.MoreObjects.firstNonNull;
 
 @BatchSide
 public abstract class AbstractPatternInitializer {