aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorEric Hartmann <hartmann.eric@gmail.com>2018-07-10 17:11:27 +0200
committerSonarTech <sonartech@sonarsource.com>2018-07-11 20:21:23 +0200
commit00f5fde4dcfff7944bfd2e695e2c59b692034e0a (patch)
tree38367d146f8804465df4b141ffcee182aab3aeb6 /server
parent83d228436865d8d12abb039e264737ca59c5ed1a (diff)
downloadsonarqube-00f5fde4dcfff7944bfd2e695e2c59b692034e0a.tar.gz
sonarqube-00f5fde4dcfff7944bfd2e695e2c59b692034e0a.zip
Fix quality flaws
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleWsSupport.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleWsSupport.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleWsSupport.java
index e9d529117f5..039d8eb4b5e 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleWsSupport.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleWsSupport.java
@@ -90,10 +90,9 @@ public class RuleWsSupport {
public OrganizationDto getOrganizationByKey(DbSession dbSession, @Nullable String organizationKey) {
String organizationOrDefaultKey = Optional.ofNullable(organizationKey)
.orElseGet(defaultOrganizationProvider.get()::getKey);
- OrganizationDto organization = checkFoundWithOptional(
+ return checkFoundWithOptional(
dbClient.organizationDao().selectByKey(dbSession, organizationOrDefaultKey),
"No organization with key '%s'", organizationOrDefaultKey);
- return organization;
}
Map<String, UserDto> getUsersByUuid(DbSession dbSession, List<RuleDto> rules) {