From: Aurelien Poscia Date: Mon, 24 Apr 2023 11:59:33 +0000 (+0200) Subject: SONAR-19084 Compute the diffs between GitHub users and DB users X-Git-Tag: 10.1.0.73491~302 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c84b4032a56be146536423221b5c82aea7c418e3;p=sonarqube.git SONAR-19084 Compute the diffs between GitHub users and DB users --- diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java index e61938ac2a9..84ab1500417 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java @@ -108,7 +108,7 @@ public class UserDao implements Dao { return selectUsers(dbSession, userQuery, pagination); } - private List selectUsers(DbSession dbSession, UserQuery userQuery, Pagination pagination) { + private static List selectUsers(DbSession dbSession, UserQuery userQuery, Pagination pagination) { if (userQuery.getUserUuids() != null) { return executeLargeInputs( userQuery.getUserUuids(), diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserQuery.java index 003083807a8..f9794b03508 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserQuery.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserQuery.java @@ -38,10 +38,6 @@ public class UserQuery { private final Long sonarLintLastConnectionDateTo; private final Set userUuids; - public static UserQuery copyWithNewRangeOfUserUuids(UserQuery userQuery, Collection userUuids) { - return new UserQuery(userQuery, userUuids); - } - private UserQuery(UserQuery userQuery, Collection userUuids) { this.searchText = userQuery.getSearchText(); this.isActive = userQuery.isActive(); @@ -66,6 +62,10 @@ public class UserQuery { this.userUuids = userUuids; } + public static UserQuery copyWithNewRangeOfUserUuids(UserQuery userQuery, Collection userUuids) { + return new UserQuery(userQuery, userUuids); + } + private static Long formatDateToInput(@Nullable OffsetDateTime dateTo) { if (dateTo == null) { return null;