private byte[] locations;
private long createdAt;
private long updatedAt;
- private Boolean quickFixAvailable;
+ private boolean quickFixAvailable;
// functional dates stored as Long
private Long issueCreationDate;
return this;
}
- @CheckForNull
- public Boolean isQuickFixAvailable() {
+ public boolean isQuickFixAvailable() {
return quickFixAvailable;
}
- public IssueDto setQuickFixAvailable(@Nullable Boolean quickFixAvailable) {
+ public IssueDto setQuickFixAvailable(boolean quickFixAvailable) {
this.quickFixAvailable = quickFixAvailable;
return this;
}
issue.setSelectedAt(selectedAt);
issue.setLocations(parseLocations());
issue.setIsFromExternalRuleEngine(isExternal);
- issue.setQuickFixAvailable(quickFixAvailable != null && quickFixAvailable);
+ issue.setQuickFixAvailable(quickFixAvailable);
return issue;
}
}
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
import static org.apache.commons.lang.math.RandomUtils.nextInt;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.assertFalse;
import static org.junit.rules.ExpectedException.none;
import static org.sonar.db.component.ComponentTesting.newDirectory;
import static org.sonar.db.component.ComponentTesting.newFileDto;
assertThat(issue.getLocations()).isNull();
assertThat(issue.parseLocations()).isNull();
assertThat(issue.isExternal()).isTrue();
- assertThat(issue.isQuickFixAvailable()).isNull();
+ assertFalse(issue.isQuickFixAvailable());
}
@Test
dto.setIssueCreationTime(1_450_000_000_000L);
dto.setIssueUpdateTime(1_450_000_000_000L);
dto.setIssueCloseTime(1_450_000_000_000L);
- dto.setQuickFixAvailable(null);
return dto;
}