]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10040 clean code
authorGuillaume Jambet <guillaume.jambet@sonarsource.com>
Thu, 2 Nov 2017 15:38:40 +0000 (16:38 +0100)
committerGuillaume Jambet <guillaume.jambet@gmail.com>
Wed, 8 Nov 2017 12:51:31 +0000 (13:51 +0100)
server/sonar-server/src/main/java/org/sonar/server/issue/IssueFieldsSetter.java
server/sonar-server/src/main/resources/org/sonar/server/license/ws/list-example.json [deleted file]

index 1bfdd848ce867aee910fa242335841bcdb4ffa47..6ee216bf7210ba9f7aad864c24feb9c7bf67672a 100644 (file)
@@ -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 (file)
index f8a7526..0000000
+++ /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"
-      }
-    }
-  ]
-}