From f3d255a3ffa4199e30e6956dad52e5e572f0de0d Mon Sep 17 00:00:00 2001 From: Guillaume Jambet Date: Thu, 2 Nov 2017 16:38:40 +0100 Subject: [PATCH] SONAR-10040 clean code --- .../sonar/server/issue/IssueFieldsSetter.java | 2 +- .../sonar/server/license/ws/list-example.json | 30 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 server/sonar-server/src/main/resources/org/sonar/server/license/ws/list-example.json diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueFieldsSetter.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueFieldsSetter.java index 1bfdd848ce8..6ee216bf721 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueFieldsSetter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueFieldsSetter.java @@ -286,7 +286,7 @@ public class IssueFieldsSetter { public boolean setEffort(DefaultIssue issue, @Nullable Duration value, IssueChangeContext context) { Duration oldValue = issue.effort(); if (!Objects.equals(value, oldValue)) { - issue.setEffort(value != null ? value : null); + issue.setEffort(value); issue.setFieldChange(context, TECHNICAL_DEBT, oldValue != null ? oldValue.toMinutes() : null, value != null ? value.toMinutes() : null); issue.setUpdateDate(context.date()); issue.setChanged(true); diff --git a/server/sonar-server/src/main/resources/org/sonar/server/license/ws/list-example.json b/server/sonar-server/src/main/resources/org/sonar/server/license/ws/list-example.json deleted file mode 100644 index f8a7526000d..00000000000 --- a/server/sonar-server/src/main/resources/org/sonar/server/license/ws/list-example.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "licenses": [ - { - "key": "sonar.devcockpit.license.secured", - "name": "Dev Cockpit", - "value": "ABCD", - "product": "other", - "organization": "Unknown", - "expiration": "2010-01-01", - "serverId": "54321", - "type": "EVALUATION", - "invalidProduct": true, - "invalidExpiration": true, - "invalidServerId": true - }, - { - "key": "sonar.governance.license.secured", - "name": "Governance", - "value": "EFHG", - "product": "governance", - "organization": "SonarSource", - "expiration": "2099-01-01", - "serverId": "12345", - "type": "PRODUCTION", - "additionalProperties": { - "other": "value" - } - } - ] -} -- 2.39.5