import org.sonar.api.issue.ActionPlan;
import org.sonar.core.issue.DefaultActionPlan;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
import java.util.Date;
/**
return this;
}
+ @CheckForNull
public String getDescription() {
return description;
}
- public ActionPlanDto setDescription(String description) {
+ public ActionPlanDto setDescription(@Nullable String description) {
this.description = description;
return this;
}
return this;
}
+ @CheckForNull
public Date getDeadLine() {
return deadLine;
}
- public ActionPlanDto setDeadLine(Date deadLine) {
+ public ActionPlanDto setDeadLine(@Nullable Date deadLine) {
this.deadLine = deadLine;
return this;
}
@CheckForNull
String description();
- @CheckForNull
String userLogin();
String status();
import org.sonar.core.resource.ResourceQuery;
import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Date;
return actionPlanDto.toActionPlan();
}
- public ActionPlan findByKey(@CheckForNull String key) {
+ @CheckForNull
+ public ActionPlan findByKey(String key) {
ActionPlanDto actionPlanDto = actionPlanDao.findByKey(key);
if (actionPlanDto == null) {
return null;
private Collection<ActionPlan> toActionPlans(Collection<ActionPlanDto> actionPlanDtos) {
return newArrayList(Iterables.transform(actionPlanDtos, new Function<ActionPlanDto, ActionPlan>() {
@Override
- public ActionPlan apply(@Nullable ActionPlanDto actionPlanDto) {
+ public ActionPlan apply(ActionPlanDto actionPlanDto) {
return actionPlanDto.toActionPlan();
}
}));
import org.sonar.core.resource.ResourceQuery;
import org.sonar.server.platform.UserSession;
+import javax.annotation.Nullable;
+
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
}
@VisibleForTesting
- Result<ActionPlan> createActionPlanResult(Map<String, String> parameters, String oldName) {
+ Result<ActionPlan> createActionPlanResult(Map<String, String> parameters, @Nullable String oldName) {
Result<ActionPlan> result = new Result<ActionPlan>();
String name = parameters.get("name");