From 28ffc4ec6d2b9cbd2e7e24913f07bd38979dfdd2 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 20 Jun 2013 08:41:33 +0200 Subject: [PATCH] Fi quality flaw --- .../main/java/org/sonar/core/issue/DefaultIssueFilter.java | 6 +++--- .../org/sonar/server/issue/InternalRubyIssueService.java | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueFilter.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueFilter.java index f2269b81a3e..5f59c0f0e92 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueFilter.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueFilter.java @@ -27,7 +27,7 @@ public class DefaultIssueFilter { private Long id; private String name; private String user; - private Boolean shared = false; + private boolean shared = false; private String description; private String data; private Date createdAt; @@ -72,11 +72,11 @@ public class DefaultIssueFilter { return this; } - public Boolean shared() { + public boolean shared() { return shared; } - public DefaultIssueFilter setShared(Boolean shared) { + public DefaultIssueFilter setShared(boolean shared) { this.shared = shared; return this; } diff --git a/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java b/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java index 92f199f1729..42754d424ce 100644 --- a/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java +++ b/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java @@ -484,7 +484,8 @@ public class InternalRubyIssueService implements ServerComponent { String name = params.get("name"); String description = params.get("description"); String data = params.get("data"); - Boolean shared = RubyUtils.toBoolean(params.get("shared")); + Boolean sharedParam = RubyUtils.toBoolean(params.get("shared")); + boolean shared = sharedParam != null ? sharedParam : false; if (isUpdate) { checkMandatoryParameter(id, "id", result); -- 2.39.5