diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-09-30 10:03:37 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-09-30 10:03:37 +0200 |
commit | 423d0917eceeb1695196e5d39be401dee2f501ba (patch) | |
tree | 4100e30e512bf44bef38471f3e318f4a7a3bd15b /server | |
parent | 3dc31a53701aa20bd05fe54a34875b397ffa72c4 (diff) | |
download | sonarqube-423d0917eceeb1695196e5d39be401dee2f501ba.tar.gz sonarqube-423d0917eceeb1695196e5d39be401dee2f501ba.zip |
Fix Quality flaws
Diffstat (limited to 'server')
4 files changed, 25 insertions, 3 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/app/StartupBarrier.java b/server/sonar-ce/src/main/java/org/sonar/ce/app/StartupBarrier.java index a430a10ab27..5620fa6fa5e 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/app/StartupBarrier.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/app/StartupBarrier.java @@ -19,7 +19,6 @@ */ package org.sonar.ce.app; -@FunctionalInterface interface StartupBarrier { /** * This blocking call, waits for a process (or anything) to be operational until either it is actually operational, or diff --git a/server/sonar-server/src/main/java/org/sonar/server/organization/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/organization/package-info.java new file mode 100644 index 00000000000..5e125d11111 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/organization/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact 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. + */ +@ParametersAreNonnullByDefault +package org.sonar.server.organization; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsData.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsData.java index c0d90af4fc1..630a09beff5 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsData.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsData.java @@ -88,7 +88,7 @@ class SearchMyProjectsData { private static Map<String, String> buildQualityGateStatuses(List<MeasureDto> measures) { return ImmutableMap.copyOf(measures.stream() - .collect(Collectors.toMap(measure -> measure.getComponentUuid(), MeasureDto::getData))); + .collect(Collectors.toMap(MeasureDto::getComponentUuid, MeasureDto::getData))); } static class Builder { diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/SearchAction.java index ae7a0b8600d..dca7ae7671d 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/SearchAction.java @@ -354,7 +354,7 @@ public class SearchAction implements RulesWsAction { List<RuleKey> ruleKeys = result.getIds(); // rule order is managed by ES Map<RuleKey, RuleDto> rulesByRuleKey = Maps.uniqueIndex( - dbClient.ruleDao().selectByKeys(dbSession, ruleKeys), input -> input.getKey()); + dbClient.ruleDao().selectByKeys(dbSession, ruleKeys), RuleDto::getKey); List<RuleDto> rules = new ArrayList<>(); for (RuleKey ruleKey : ruleKeys) { RuleDto rule = rulesByRuleKey.get(ruleKey); |