diff options
author | Pierre <pierre.guillot@sonarsource.com> | 2021-10-18 16:42:53 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-10-19 20:03:22 +0000 |
commit | 80d581035ac0d51a71913d861e2562a52e4ee863 (patch) | |
tree | 11db7273d5caa5cbcc293dd0a7fdd2a5f0ce0817 | |
parent | 7f8a4271ae5b4710466cd1fadb37c267e427c38a (diff) | |
download | sonarqube-80d581035ac0d51a71913d861e2562a52e4ee863.tar.gz sonarqube-80d581035ac0d51a71913d861e2562a52e4ee863.zip |
SONAR-15487 change quickfix type to be false by default (Solving issue with Oracle)
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java | 9 | ||||
-rw-r--r-- | server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java index 80a8bc524d2..f1bc6419665 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java @@ -76,7 +76,7 @@ public final class IssueDto implements Serializable { private byte[] locations; private long createdAt; private long updatedAt; - private Boolean quickFixAvailable; + private boolean quickFixAvailable; // functional dates stored as Long private Long issueCreationDate; @@ -693,12 +693,11 @@ public final class IssueDto implements Serializable { 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; } @@ -758,7 +757,7 @@ public final class IssueDto implements Serializable { issue.setSelectedAt(selectedAt); issue.setLocations(parseLocations()); issue.setIsFromExternalRuleEngine(isExternal); - issue.setQuickFixAvailable(quickFixAvailable != null && quickFixAvailable); + issue.setQuickFixAvailable(quickFixAvailable); return issue; } } diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java index d0a921dbb1e..0ee427cdeca 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java @@ -46,6 +46,7 @@ import static java.util.Arrays.asList; 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; @@ -107,7 +108,7 @@ public class IssueDaoTest { assertThat(issue.getLocations()).isNull(); assertThat(issue.parseLocations()).isNull(); assertThat(issue.isExternal()).isTrue(); - assertThat(issue.isQuickFixAvailable()).isNull(); + assertFalse(issue.isQuickFixAvailable()); } @Test @@ -467,7 +468,6 @@ public class IssueDaoTest { 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; } |