aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java2
-rw-r--r--server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Timeouts.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/search/QueryContext.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/util/ProgressLogger.java2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyDao.java10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java4
-rw-r--r--sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java32
-rw-r--r--sonar-home/src/main/java/org/sonar/home/cache/FileCache.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java2
10 files changed, 30 insertions, 30 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java b/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java
index 34887667ca5..532d5b592a8 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java
@@ -109,7 +109,7 @@ public class CeServer implements Monitored {
while (!stopAwait) {
try {
// wait for a quite long time but we will be interrupted if flag changes anyway
- Thread.sleep(10000);
+ Thread.sleep(10_000);
} catch (InterruptedException e) {
// continue and check the flag
}
diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Timeouts.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Timeouts.java
index 51c1e5ef777..3db3a326453 100644
--- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Timeouts.java
+++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Timeouts.java
@@ -31,7 +31,7 @@ class Timeouts {
}
public Timeouts() {
- this(60000L);
+ this(60_000L);
}
/**
diff --git a/server/sonar-server/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java b/server/sonar-server/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java
index f89f5f5ff6a..d3f40feea2d 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java
@@ -53,7 +53,7 @@ public class EmailNotificationChannel extends NotificationChannel {
* @see org.apache.commons.mail.Email#setSocketConnectionTimeout(int)
* @see org.apache.commons.mail.Email#setSocketTimeout(int)
*/
- private static final int SOCKET_TIMEOUT = 30000;
+ private static final int SOCKET_TIMEOUT = 30_000;
/**
* Email Header Field: "List-ID".
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/QueryContext.java b/server/sonar-server/src/main/java/org/sonar/server/search/QueryContext.java
index 6dada64ab4b..233a8cd72e4 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/search/QueryContext.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/search/QueryContext.java
@@ -127,7 +127,7 @@ public class QueryContext {
* Limit on the number of results to return. Defaults to {@link #DEFAULT_LIMIT}.
*/
public int getLimit() {
- return showFullResult ? 999999 : limit;
+ return showFullResult ? 999_999 : limit;
}
/**
diff --git a/sonar-core/src/main/java/org/sonar/core/util/ProgressLogger.java b/sonar-core/src/main/java/org/sonar/core/util/ProgressLogger.java
index b6ac17345e2..e69b02e0981 100644
--- a/sonar-core/src/main/java/org/sonar/core/util/ProgressLogger.java
+++ b/sonar-core/src/main/java/org/sonar/core/util/ProgressLogger.java
@@ -30,7 +30,7 @@ import org.sonar.api.utils.log.Loggers;
*/
public class ProgressLogger {
- public static final long DEFAULT_PERIOD_MS = 60000L;
+ public static final long DEFAULT_PERIOD_MS = 60_000L;
private final Timer timer;
private final LoggerTimerTask task;
diff --git a/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyDao.java b/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyDao.java
index 067838dcf26..7f1a66c54e3 100644
--- a/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyDao.java
+++ b/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyDao.java
@@ -75,11 +75,11 @@ public class WidgetPropertyDao implements Dao {
public void deleteByWidgetIds(DbSession session, List<Long> widgetIdsWithPropertiesToDelete) {
executeLargeInputs(
- widgetIdsWithPropertiesToDelete,
- input -> {
- mapper(session).deleteByWidgetIds(input);
- return Collections.emptyList();
- });
+ widgetIdsWithPropertiesToDelete,
+ input -> {
+ mapper(session).deleteByWidgetIds(input);
+ return Collections.emptyList();
+ });
}
private static WidgetPropertyMapper mapper(DbSession session) {
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java b/sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java
index 55afe2e559e..5f78606ee51 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java
+++ b/sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java
@@ -312,11 +312,11 @@ public class RuleDto {
}
public Set<String> getTags() {
- return tags == null ? new HashSet<String>() : new TreeSet<>(Arrays.asList(StringUtils.split(tags, ',')));
+ return tags == null ? new HashSet<>() : new TreeSet<>(Arrays.asList(StringUtils.split(tags, ',')));
}
public Set<String> getSystemTags() {
- return systemTags == null ? new HashSet<String>() : new TreeSet<>(Arrays.asList(StringUtils.split(systemTags, ',')));
+ return systemTags == null ? new HashSet<>() : new TreeSet<>(Arrays.asList(StringUtils.split(systemTags, ',')));
}
private String getTagsField() {
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java b/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java
index cb0ad6dc6b8..eacda25b99b 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java
+++ b/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java
@@ -76,14 +76,14 @@ public class GroupMembershipDao implements Dao {
public Map<String, Integer> countUsersByGroups(DbSession session, Collection<Long> groupIds) {
Map<String, Integer> result = Maps.newHashMap();
executeLargeInputs(
- groupIds,
- input -> {
- List<GroupUserCount> userCounts = mapper(session).countUsersByGroup(input);
- for (GroupUserCount count : userCounts) {
- result.put(count.groupName(), count.userCount());
- }
- return userCounts;
- });
+ groupIds,
+ input -> {
+ List<GroupUserCount> userCounts = mapper(session).countUsersByGroup(input);
+ for (GroupUserCount count : userCounts) {
+ result.put(count.groupName(), count.userCount());
+ }
+ return userCounts;
+ });
return result;
}
@@ -91,14 +91,14 @@ public class GroupMembershipDao implements Dao {
public Multimap<String, String> selectGroupsByLogins(DbSession session, Collection<String> logins) {
Multimap<String, String> result = ArrayListMultimap.create();
executeLargeInputs(
- logins,
- input -> {
- List<LoginGroup> groupMemberships = mapper(session).selectGroupsByLogins(input);
- for (LoginGroup membership : groupMemberships) {
- result.put(membership.login(), membership.groupName());
- }
- return groupMemberships;
- });
+ logins,
+ input -> {
+ List<LoginGroup> groupMemberships = mapper(session).selectGroupsByLogins(input);
+ for (LoginGroup membership : groupMemberships) {
+ result.put(membership.login(), membership.groupName());
+ }
+ return groupMemberships;
+ });
return result;
}
diff --git a/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java b/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java
index a723cf164de..5f341985bf7 100644
--- a/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java
+++ b/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java
@@ -32,7 +32,7 @@ import javax.annotation.CheckForNull;
public class FileCache {
/** Maximum loop count when creating temp directories. */
- private static final int TEMP_DIR_ATTEMPTS = 10000;
+ private static final int TEMP_DIR_ATTEMPTS = 10_000;
private final File dir;
private final File tmpDir;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java
index f3c2bf812cd..f58a3918c5d 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java
@@ -30,7 +30,7 @@ import org.apache.commons.lang.builder.ToStringStyle;
*/
public class WorkDuration implements Serializable {
- static final int DAY_POSITION_IN_LONG = 10000;
+ static final int DAY_POSITION_IN_LONG = 10_000;
static final int HOUR_POSITION_IN_LONG = 100;
static final int MINUTE_POSITION_IN_LONG = 1;