aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-02-16 22:03:42 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-02-16 22:03:42 +0100
commit53b32712a458e859d36d19c6f1162d05c523b280 (patch)
tree363c5359e481eca97a79d5527ac69e46fe35ac86 /sonar-db/src
parent33acda7596369ed1bffbcd25b8d0d590fa87be49 (diff)
downloadsonarqube-53b32712a458e859d36d19c6f1162d05c523b280.tar.gz
sonarqube-53b32712a458e859d36d19c6f1162d05c523b280.zip
Remove useless boxing of UserDto.getId().intValue()
Diffstat (limited to 'sonar-db/src')
-rw-r--r--sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java b/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java
index 49195fba4c2..1c1fe9287cf 100644
--- a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java
@@ -724,11 +724,11 @@ public class OrganizationDaoTest {
OrganizationDto organization3 = dbTester.organizations().insert();
dbTester.users().insertPermissionOnUser(organization3, otherUser, PERMISSION_2);
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), PERMISSION_2))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), PERMISSION_2))
.extracting(OrganizationDto::getUuid)
.containsOnly(organization1.getUuid(), organization2.getUuid());
- assertThat(underTest.selectByPermission(dbSession, otherUser.getId().intValue(), PERMISSION_2))
+ assertThat(underTest.selectByPermission(dbSession, otherUser.getId(), PERMISSION_2))
.extracting(OrganizationDto::getUuid)
.containsOnly(organization3.getUuid());
@@ -753,11 +753,11 @@ public class OrganizationDaoTest {
dbTester.users().insertPermissionOnGroup(group2, PERMISSION_1);
dbTester.users().insertMember(group2, otherUser);
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), PERMISSION_1))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), PERMISSION_1))
.extracting(OrganizationDto::getUuid)
.containsOnly(organization1.getUuid(), organization2.getUuid());
- assertThat(underTest.selectByPermission(dbSession, otherUser.getId().intValue(), PERMISSION_1))
+ assertThat(underTest.selectByPermission(dbSession, otherUser.getId(), PERMISSION_1))
.extracting(OrganizationDto::getUuid)
.containsOnly(organization3.getUuid());
@@ -778,7 +778,7 @@ public class OrganizationDaoTest {
dbTester.users().insertMember(group2, user);
dbTester.users().insertPermissionOnUser(organization, user, permission);
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), permission))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), permission))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(organization.getUuid());
}
@@ -794,16 +794,16 @@ public class OrganizationDaoTest {
dbTester.users().insertPermissionOnUser(organization, otherUser, PERMISSION_2);
dbTester.users().insertPermissionOnUser(otherOrganization, otherUser, PERMISSION_1);
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), PERMISSION_1))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), PERMISSION_1))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(organization.getUuid());
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), PERMISSION_2))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), PERMISSION_2))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(otherOrganization.getUuid());
- assertThat(underTest.selectByPermission(dbSession, otherUser.getId().intValue(), PERMISSION_1))
+ assertThat(underTest.selectByPermission(dbSession, otherUser.getId(), PERMISSION_1))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(otherOrganization.getUuid());
- assertThat(underTest.selectByPermission(dbSession, otherUser.getId().intValue(), PERMISSION_2))
+ assertThat(underTest.selectByPermission(dbSession, otherUser.getId(), PERMISSION_2))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(organization.getUuid());
}
@@ -827,16 +827,16 @@ public class OrganizationDaoTest {
dbTester.users().insertMember(group2, otherUser);
dbTester.users().insertMember(otherGroup1, otherUser);
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), PERMISSION_1))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), PERMISSION_1))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(organization.getUuid());
- assertThat(underTest.selectByPermission(dbSession, user.getId().intValue(), PERMISSION_2))
+ assertThat(underTest.selectByPermission(dbSession, user.getId(), PERMISSION_2))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(otherOrganization.getUuid());
- assertThat(underTest.selectByPermission(dbSession, otherUser.getId().intValue(), PERMISSION_1))
+ assertThat(underTest.selectByPermission(dbSession, otherUser.getId(), PERMISSION_1))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(otherOrganization.getUuid());
- assertThat(underTest.selectByPermission(dbSession, otherUser.getId().intValue(), PERMISSION_2))
+ assertThat(underTest.selectByPermission(dbSession, otherUser.getId(), PERMISSION_2))
.extracting(OrganizationDto::getUuid)
.containsOnlyOnce(organization.getUuid());
}