]> source.dussan.org Git - sonarqube.git/commitdiff
Fixed quality issues
authorJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Wed, 5 Jun 2013 07:51:44 +0000 (09:51 +0200)
committerJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Wed, 5 Jun 2013 07:51:44 +0000 (09:51 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/utils/Semaphores.java

index 24ead0dc14241f53e5646c2d8184cf20263a6e3d..f3b7500521e250d37861ad3402134ed43ac5d26c 100644 (file)
@@ -22,6 +22,7 @@ package org.sonar.api.utils;
 import org.sonar.api.ServerComponent;
 import org.sonar.api.task.TaskComponent;
 
+import javax.annotation.Nullable;
 import java.util.Date;
 
 /**
@@ -94,8 +95,8 @@ public interface Semaphores extends TaskComponent, ServerComponent {
       return lockedAt;
     }
 
-    public Semaphore setLockedAt(Date lockedAt) {
-      this.lockedAt = (Date) lockedAt.clone();
+    public Semaphore setLockedAt(@Nullable Date lockedAt) {
+      this.lockedAt = lockedAt;
       return this;
     }
 
@@ -103,8 +104,8 @@ public interface Semaphores extends TaskComponent, ServerComponent {
       return createdAt;
     }
 
-    public Semaphore setCreatedAt(Date createdAt) {
-      this.createdAt = (Date) createdAt.clone();
+    public Semaphore setCreatedAt(@Nullable Date createdAt) {
+      this.createdAt = createdAt;
       return this;
     }
 
@@ -112,8 +113,8 @@ public interface Semaphores extends TaskComponent, ServerComponent {
       return updatedAt;
     }
 
-    public Semaphore setUpdatedAt(Date updatedAt) {
-      this.updatedAt = (Date) updatedAt.clone();
+    public Semaphore setUpdatedAt(@Nullable Date updatedAt) {
+      this.updatedAt = updatedAt;
       return this;
     }