diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-05-02 13:48:37 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-05-02 15:02:42 +0200 |
commit | d5beaea2e89b43e08d160dca12b54bde090b6fd0 (patch) | |
tree | 78b8b5d1e9fc4c52c7f64d939df46adeef9d0859 /server | |
parent | dd0237017f0b7d5be1c41017d2781c56f64b1332 (diff) | |
download | sonarqube-d5beaea2e89b43e08d160dca12b54bde090b6fd0.tar.gz sonarqube-d5beaea2e89b43e08d160dca12b54bde090b6fd0.zip |
Fix Quality flaws
Diffstat (limited to 'server')
3 files changed, 3 insertions, 7 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java index 8a2009dc25b..72c98073dce 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java @@ -112,10 +112,8 @@ public class InternalCeQueueImpl extends CeQueueImpl implements InternalCeQueue private static void updateTaskResult(CeActivityDto activityDto, @Nullable CeTaskResult taskResult) { if (taskResult != null) { - java.util.Optional<String> analysisUuid = taskResult.getAnalysisUuid(); - if (analysisUuid.isPresent()) { - activityDto.setAnalysisUuid(analysisUuid.get()); - } + Optional<String> analysisUuid = taskResult.getAnalysisUuid(); + analysisUuid.ifPresent(activityDto::setAnalysisUuid); } } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java index ad036e0a497..b204593a0e9 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java @@ -37,8 +37,6 @@ import static org.sonar.db.DatabaseUtils.executeLargeInputsIntoSet; */ public class AuthorizationDao implements Dao { - private static final String USER_ID_PARAM = "userId"; - /** * Loads all the permissions granted to logged-in user for the specified organization */ diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/DefinedQProfileRepositoryImpl.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/DefinedQProfileRepositoryImpl.java index 34a354f2502..97b76dc8662 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/DefinedQProfileRepositoryImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/DefinedQProfileRepositoryImpl.java @@ -119,7 +119,7 @@ public class DefinedQProfileRepositoryImpl implements DefinedQProfileRepository }); } - private Map<String, List<DefinedQProfile>> toQualityProfilesByLanguage(ListMultimap<String, RulesProfile> rulesProfilesByLanguage) { + private static Map<String, List<DefinedQProfile>> toQualityProfilesByLanguage(ListMultimap<String, RulesProfile> rulesProfilesByLanguage) { Map<String, List<DefinedQProfile.Builder>> buildersByLanguage = Multimaps.asMap(rulesProfilesByLanguage) .entrySet() .stream() |