aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java31
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStep.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStep.java2
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java23
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java3
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java3
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/app/ProgrammaticLogbackValve.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/authentication/JwtSerializer.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java15
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/project/ws/IndexAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/property/ws/IndexAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java3
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleQueryFactory.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/ws/UpdateAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/webhook/ws/DeleteAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/webhook/ws/UpdateAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/webhook/ws/WebhookDeliveriesAction.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/SecurityProperties.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/storage/Storage.java3
-rw-r--r--sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/TextLineNumber.java1
27 files changed, 43 insertions, 77 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java
index c64942f5890..b4c193ec945 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java
@@ -19,25 +19,12 @@
*/
package org.sonar.ce.task.projectanalysis.duplication;
-import static com.google.common.collect.FluentIterable.from;
-import static com.google.common.collect.Iterables.isEmpty;
-import static java.util.Objects.requireNonNull;
-import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_KEY;
-import static org.sonar.api.measures.CoreMetrics.DUPLICATED_BLOCKS_KEY;
-import static org.sonar.api.measures.CoreMetrics.DUPLICATED_FILES_KEY;
-import static org.sonar.api.measures.CoreMetrics.DUPLICATED_LINES_DENSITY_KEY;
-import static org.sonar.api.measures.CoreMetrics.DUPLICATED_LINES_KEY;
-import static org.sonar.api.measures.CoreMetrics.LINES_KEY;
-import static org.sonar.api.measures.CoreMetrics.NCLOC_KEY;
-
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableList;
import java.util.HashSet;
import java.util.Set;
-
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-
-import org.sonar.ce.task.projectanalysis.component.Component;
-import org.sonar.ce.task.projectanalysis.component.PathAwareCrawler;
import org.sonar.ce.task.projectanalysis.component.Component;
import org.sonar.ce.task.projectanalysis.component.PathAwareCrawler;
import org.sonar.ce.task.projectanalysis.component.TreeRootHolder;
@@ -51,8 +38,16 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureRepository;
import org.sonar.ce.task.projectanalysis.metric.Metric;
import org.sonar.ce.task.projectanalysis.metric.MetricRepository;
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableList;
+import static com.google.common.collect.FluentIterable.from;
+import static com.google.common.collect.Iterables.isEmpty;
+import static java.util.Objects.requireNonNull;
+import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_KEY;
+import static org.sonar.api.measures.CoreMetrics.DUPLICATED_BLOCKS_KEY;
+import static org.sonar.api.measures.CoreMetrics.DUPLICATED_FILES_KEY;
+import static org.sonar.api.measures.CoreMetrics.DUPLICATED_LINES_DENSITY_KEY;
+import static org.sonar.api.measures.CoreMetrics.DUPLICATED_LINES_KEY;
+import static org.sonar.api.measures.CoreMetrics.LINES_KEY;
+import static org.sonar.api.measures.CoreMetrics.NCLOC_KEY;
public class DuplicationMeasures {
protected final ImmutableList<Formula> formulas;
@@ -129,7 +124,7 @@ public class DuplicationMeasures {
// use a set to count lines only once
Set<Integer> duplicatedLineNumbers = new HashSet<>();
- long blocks = 0;
+ int blocks = 0;
for (Duplication duplication : duplications) {
blocks++;
addLines(duplication.getOriginal(), duplicatedLineNumbers);
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java
index 17e1df16efb..92e5c4bedb6 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java
@@ -185,7 +185,7 @@ public class IssueCounter extends IssueVisitor {
if (!periodHolder.hasPeriod()) {
return;
}
- Double unresolvedVariations = (double) currentCounters.counterForPeriod().unresolved;
+ double unresolvedVariations = (double) currentCounters.counterForPeriod().unresolved;
measureRepository.add(component, metricRepository.getByKey(NEW_VIOLATIONS_KEY), Measure.newMeasureBuilder()
.setVariation(unresolvedVariations)
.createNoValue());
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStep.java
index cefa5bb4568..a69c858824a 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStep.java
@@ -136,7 +136,7 @@ public class PersistFileSourcesStep implements ComputationStep {
boolean srcHashUpdated = !srcHash.equals(previousDto.getSrcHash());
String revision = computeRevision(latestChangeWithRevision);
boolean revisionUpdated = !ObjectUtils.equals(revision, previousDto.getRevision());
- boolean lineHashesVersionUpdated = !previousDto.getLineHashesVersion().equals(lineHashesVersion);
+ boolean lineHashesVersionUpdated = previousDto.getLineHashesVersion() != lineHashesVersion;
if (binaryDataUpdated || srcHashUpdated || revisionUpdated || lineHashesVersionUpdated) {
previousDto
.setBinaryData(binaryData)
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStep.java
index fd830f733f9..6062caa9a67 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStep.java
@@ -92,7 +92,7 @@ public class PersistIssuesStep implements ComputationStep {
}
private void persistNewIssue(IssueMapper mapper, DefaultIssue issue) {
- Integer ruleId = ruleRepository.getByKey(issue.ruleKey()).getId();
+ int ruleId = ruleRepository.getByKey(issue.ruleKey()).getId();
IssueDto dto = IssueDto.toDtoForComputationInsert(issue, ruleId, system2.now());
mapper.insert(dto);
}
diff --git a/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java b/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
index 79ba984c3fe..1df8194edf7 100644
--- a/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
@@ -170,29 +170,6 @@ public class DatabaseUtils {
}
/**
- * Partition by 1000 elements a list of input and execute a consumer on each part.
- *
- * The goal is to prevent issue with ORACLE when there's more than 1000 elements in a 'in ('X', 'Y', ...)'
- * and with MsSQL when there's more than 2000 parameters in a query
- *
- * @param inputs the whole list of elements to be partitioned
- * @param sqlCaller a {@link Function} which calls the SQL update/delete and returns the number of updated/deleted rows.
- * @param partitionSizeManipulations the function that computes the number of usages of a partition, for example
- * {@code partitionSize -> partitionSize / 2} when the partition of elements
- * in used twice in the SQL request.
- * @return the total number of updated/deleted rows (computed as the sum of the values returned by {@code sqlCaller}).
- */
- public static <INPUT extends Comparable<INPUT>> int executeLargeUpdates(Collection<INPUT> inputs, Function<List<INPUT>, Integer> sqlCaller,
- IntFunction<Integer> partitionSizeManipulations) {
- Iterable<List<INPUT>> partitions = toUniqueAndSortedPartitions(inputs, partitionSizeManipulations);
- Integer res = 0;
- for (List<INPUT> partition : partitions) {
- res += sqlCaller.apply(partition);
- }
- return res;
- }
-
- /**
* Ensure values {@code inputs} are unique (which avoids useless arguments) and sorted before creating the partition.
*/
public static <INPUT extends Comparable<INPUT>> Iterable<List<INPUT>> toUniqueAndSortedPartitions(Collection<INPUT> inputs) {
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java
index abf2f306ed3..c047bbb64cf 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java
@@ -46,9 +46,6 @@ public class DuplicationDao implements Dao {
session.getMapper(DuplicationMapper.class).batchInsert(dto);
}
- /**
- * @param componentUUid uuid of the component
- */
public List<DuplicationUnitDto> selectComponent(DbSession session, String componentUuid, String analysisUuid) {
return session.getMapper(DuplicationMapper.class).selectComponent(componentUuid, analysisUuid);
}
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java
index 0d19dbff934..37568ec8bfb 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java
@@ -71,9 +71,10 @@ public class FileSourceDto {
private String dataType;
private String dataHash;
private String revision;
+ @Nullable
private Integer lineHashesVersion;
- public Integer getLineHashesVersion() {
+ public int getLineHashesVersion() {
return lineHashesVersion != null ? lineHashesVersion : LineHashVersion.WITHOUT_SIGNIFICANT_CODE.getDbValue();
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/ProgrammaticLogbackValve.java b/server/sonar-server/src/main/java/org/sonar/server/app/ProgrammaticLogbackValve.java
index 110d8d20543..edeb65e51b6 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/app/ProgrammaticLogbackValve.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/app/ProgrammaticLogbackValve.java
@@ -33,7 +33,7 @@ import org.apache.commons.lang.reflect.FieldUtils;
public class ProgrammaticLogbackValve extends LogbackValve {
@Override
- public void startInternal() throws LifecycleException {
+ public synchronized void startInternal() throws LifecycleException {
try {
// direct coupling with LogbackValve implementation
FieldUtils.writeField(this, "scheduledExecutorService", ExecutorServiceUtil.newScheduledExecutorService(), true);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/authentication/JwtSerializer.java b/server/sonar-server/src/main/java/org/sonar/server/authentication/JwtSerializer.java
index 4635a785193..fa2f75c89b3 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/authentication/JwtSerializer.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/authentication/JwtSerializer.java
@@ -128,7 +128,7 @@ public class JwtSerializer implements Startable {
for (Map.Entry<String, Object> entry : token.entrySet()) {
jwtBuilder.claim(entry.getKey(), entry.getValue());
}
- jwtBuilder.setExpiration(new Date(now + expirationTimeInSeconds * 1000))
+ jwtBuilder.setExpiration(new Date(now + expirationTimeInSeconds * 1_000L))
.signWith(SIGNATURE_ALGORITHM, secretKey);
return jwtBuilder.compact();
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
index bc3a59c55fd..7370d306fba 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
@@ -31,6 +31,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.OptionalInt;
+import java.util.OptionalLong;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
@@ -592,11 +593,11 @@ public class IssueIndex {
boolean startInclusive;
PeriodStart createdAfter = query.createdAfter();
if (createdAfter == null) {
- Optional<Long> minDate = getMinCreatedAt(filters, esQuery);
+ OptionalLong minDate = getMinCreatedAt(filters, esQuery);
if (!minDate.isPresent()) {
return Optional.empty();
}
- startTime = minDate.get();
+ startTime = minDate.getAsLong();
startInclusive = true;
} else {
startTime = createdAfter.date().getTime();
@@ -627,7 +628,7 @@ public class IssueIndex {
return Optional.of(dateHistogram);
}
- private Optional<Long> getMinCreatedAt(Map<String, QueryBuilder> filters, QueryBuilder esQuery) {
+ private OptionalLong getMinCreatedAt(Map<String, QueryBuilder> filters, QueryBuilder esQuery) {
String facetNameAndField = CREATED_AT.getFieldName();
SearchRequestBuilder esRequest = client
.prepareSearch(INDEX_TYPE_ISSUE)
@@ -642,11 +643,11 @@ public class IssueIndex {
esRequest.addAggregation(AggregationBuilders.min(facetNameAndField).field(facetNameAndField));
Min minValue = esRequest.get().getAggregations().get(facetNameAndField);
- Double actualValue = minValue.getValue();
- if (actualValue.isInfinite()) {
- return Optional.empty();
+ double actualValue = minValue.getValue();
+ if (Double.isInfinite(actualValue)) {
+ return OptionalLong.empty();
}
- return Optional.of(actualValue.longValue());
+ return OptionalLong.of((long)actualValue);
}
private void addAssignedToMeFacetIfNeeded(SearchRequestBuilder builder, SearchOptions options, IssueQuery query, Map<String, QueryBuilder> filters, QueryBuilder queryBuilder) {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java
index 959eba1dc31..395863d6b02 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java
@@ -101,6 +101,6 @@ public class EsStateSection implements SystemInfoSection {
}
private static String formatPercent(long amount) {
- return format(Locale.ENGLISH, "%.1f%%", 100 * amount * 1.0D / 100L);
+ return format(Locale.ENGLISH, "%.1f%%", 100.0 * amount * 1.0 / 100.0);
}
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java
index d9486ceeba5..782e528428b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java
@@ -117,7 +117,7 @@ public class CreateAction implements ProjectsWsAction {
OrganizationDto organization = support.getOrganization(dbSession, request.getOrganization());
userSession.checkPermission(PROVISION_PROJECTS, organization);
String visibility = request.getVisibility();
- Boolean changeToPrivate = visibility == null ? dbClient.organizationDao().getNewProjectPrivate(dbSession, organization) : "private".equals(visibility);
+ boolean changeToPrivate = visibility == null ? dbClient.organizationDao().getNewProjectPrivate(dbSession, organization) : "private".equals(visibility);
support.checkCanUpdateProjectsVisibility(organization, changeToPrivate);
ComponentDto componentDto = componentUpdater.create(dbSession, newComponentBuilder()
diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/IndexAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/IndexAction.java
index e42019715cd..3e302d20da2 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/IndexAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/IndexAction.java
@@ -124,7 +124,7 @@ public class IndexAction implements ProjectsWsAction {
private Optional<ComponentDto> getProjectByKeyOrId(DbSession dbSession, String component) {
try {
- Long componentId = Long.parseLong(component);
+ long componentId = Long.parseLong(component);
return ofNullable(dbClient.componentDao().selectById(dbSession, componentId).orElse(null));
} catch (NumberFormatException e) {
return ofNullable(dbClient.componentDao().selectByKey(dbSession, component).orElse(null));
diff --git a/server/sonar-server/src/main/java/org/sonar/server/property/ws/IndexAction.java b/server/sonar-server/src/main/java/org/sonar/server/property/ws/IndexAction.java
index 7af3bd74d13..cdd63dd6caf 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/property/ws/IndexAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/property/ws/IndexAction.java
@@ -120,7 +120,7 @@ public class IndexAction implements WsAction {
private Optional<ComponentDto> loadComponent(DbSession dbSession, String component) {
try {
- Long componentId = Long.parseLong(component);
+ long componentId = Long.parseLong(component);
return Optional.ofNullable(dbClient.componentDao().selectById(dbSession, componentId).orElse(null));
} catch (NumberFormatException e) {
return Optional.ofNullable(dbClient.componentDao().selectByKey(dbSession, component).orElse(null));
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java
index cf100e7551d..a40fd1c0ada 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java
@@ -87,8 +87,7 @@ public class ExportAction implements QProfileWsAction {
.setExampleValue(UUID_EXAMPLE_01);
action.createParam(PARAM_QUALITY_PROFILE)
- .setDescription("Quality profile name to export. If left empty, the default profile for the language is exported.",
- PARAM_QUALITY_PROFILE)
+ .setDescription("Quality profile name to export. If left empty, the default profile for the language is exported.")
.setDeprecatedKey("name", "6.6")
.setExampleValue("My Sonar way");
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java b/server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
index 2bce3356cb3..86752e3df89 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
@@ -60,7 +60,7 @@ public class CommonRuleDefinitionsImpl implements CommonRuleDefinitions {
RulesDefinition.NewRule rule = repo.createRule(CommonRuleKeys.INSUFFICIENT_BRANCH_COVERAGE);
rule.setName("Branches should have sufficient coverage by tests")
.addTags("bad-practice")
- .setHtmlDescription("An issue is created on a file as soon as the branch coverage on this file is less than the required threshold."
+ .setHtmlDescription("An issue is created on a file as soon as the branch coverage on this file is less than the required threshold. "
+ "It gives the number of branches to be covered in order to reach the required threshold.")
.setDebtRemediationFunction(rule.debtRemediationFunctions().linear("5min"))
.setGapDescription("number of uncovered conditions")
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleQueryFactory.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleQueryFactory.java
index c96ae59ab49..66048b40882 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleQueryFactory.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleQueryFactory.java
@@ -131,7 +131,7 @@ public class RuleQueryFactory {
query.setOrganization(wsSupport.getOrganizationByKey(dbSession, organizationKey));
return;
}
- OrganizationDto organization = checkFoundWithOptional(dbClient.organizationDao().selectByUuid(dbSession, profile.getOrganizationUuid()), "No organization with UUID ",
+ OrganizationDto organization = checkFoundWithOptional(dbClient.organizationDao().selectByUuid(dbSession, profile.getOrganizationUuid()), "No organization with UUID %s",
profile.getOrganizationUuid());
if (organizationKey != null) {
OrganizationDto inputOrganization = checkFoundWithOptional(dbClient.organizationDao().selectByKey(dbSession, organizationKey), "No organization with key '%s'",
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/UpdateAction.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/UpdateAction.java
index 4325ff8e6dc..bdcc7973cec 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/UpdateAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/UpdateAction.java
@@ -111,7 +111,7 @@ public class UpdateAction implements RulesWsAction {
.setExampleValue("java8,security");
action.createParam(PARAM_MARKDOWN_NOTE)
- .setDescription("Optional note in markdown format. Use empty value to remove current note. Note is not changed" +
+ .setDescription("Optional note in markdown format. Use empty value to remove current note. Note is not changed " +
"if the parameter is not set.")
.setExampleValue("my *note*");
diff --git a/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java b/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java
index c7ed814898f..2dc91e509f9 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java
@@ -69,7 +69,7 @@ public class ListDefinitionsAction implements SettingsWsAction {
public void define(WebService.NewController context) {
WebService.NewAction action = context.createAction("list_definitions")
.setDescription("List settings definitions.<br>" +
- "Requires 'Browse' permission when a component is specified<br/>",
+ "Requires 'Browse' permission when a component is specified<br/>" +
"To access licensed settings, authentication is required<br/>" +
"To access secured settings, one of the following permissions is required: " +
"<ul>" +
diff --git a/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java b/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java
index ec2d3a0ee23..7842da02318 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java
@@ -92,7 +92,7 @@ public class ValuesAction implements SettingsWsAction {
.setDescription("List settings values.<br>" +
"If no value has been set for a setting, then the default value is returned.<br>" +
"The settings from conf/sonar.properties are excluded from results.<br>" +
- "Requires 'Browse' or 'Execute Analysis' permission when a component is specified<br/>",
+ "Requires 'Browse' or 'Execute Analysis' permission when a component is specified.<br/>" +
"To access licensed settings, authentication is required<br/>" +
"To access secured settings, one of the following permissions is required: " +
"<ul>" +
diff --git a/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/DeleteAction.java b/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/DeleteAction.java
index 235c3e8a1b8..cb674b07fe3 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/DeleteAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/DeleteAction.java
@@ -63,7 +63,7 @@ public class DeleteAction implements WebhooksWsAction {
action.createParam(KEY_PARAM)
.setRequired(true)
.setMaximumLength(KEY_PARAM_MAXIMUN_LENGTH)
- .setDescription("The key of the webhook to be deleted,"+
+ .setDescription("The key of the webhook to be deleted, "+
"auto-generated value can be obtained through api/webhooks/create or api/webhooks/list")
.setExampleValue(KEY_PROJECT_EXAMPLE_001);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/UpdateAction.java b/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/UpdateAction.java
index c74a1f8f4f3..3ed56e58b3a 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/UpdateAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/UpdateAction.java
@@ -69,7 +69,7 @@ public class UpdateAction implements WebhooksWsAction {
action.createParam(KEY_PARAM)
.setRequired(true)
.setMaximumLength(KEY_PARAM_MAXIMUN_LENGTH)
- .setDescription("The key of the webhook to be updated,"+
+ .setDescription("The key of the webhook to be updated, "+
"auto-generated value can be obtained through api/webhooks/create or api/webhooks/list")
.setExampleValue(KEY_PROJECT_EXAMPLE_001);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/WebhookDeliveriesAction.java b/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/WebhookDeliveriesAction.java
index 0ae3dd4a777..f485ff153c4 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/WebhookDeliveriesAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/webhook/ws/WebhookDeliveriesAction.java
@@ -84,7 +84,7 @@ public class WebhookDeliveriesAction implements WebhooksWsAction {
action.createParam(PARAM_WEBHOOK)
.setSince("7.1")
- .setDescription("Key of the webhook that triggered those deliveries," +
+ .setDescription("Key of the webhook that triggered those deliveries, " +
"auto-generated value that can be obtained through api/webhooks/create or api/webhooks/list")
.setExampleValue(UUID_EXAMPLE_02);
diff --git a/sonar-core/src/main/java/org/sonar/core/config/SecurityProperties.java b/sonar-core/src/main/java/org/sonar/core/config/SecurityProperties.java
index 5836bd416f2..1bf16eb7edc 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/SecurityProperties.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/SecurityProperties.java
@@ -38,7 +38,7 @@ class SecurityProperties {
.defaultValue(Boolean.toString(CoreProperties.CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE))
.name("Force user authentication")
.description(
- "Forcing user authentication prevents anonymous users from accessing the SonarQube UI, or project data via the Web API."
+ "Forcing user authentication prevents anonymous users from accessing the SonarQube UI, or project data via the Web API. "
+ "Some specific read-only Web APIs, including those required to prompt authentication, are still available anonymously.")
.type(PropertyType.BOOLEAN)
.category(CoreProperties.CATEGORY_SECURITY)
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
index 3eaed17e31b..128afb4f50e 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
@@ -70,7 +70,7 @@ public class DefaultActiveRulesLoader implements ActiveRulesLoader {
List<LoadedActiveRule> ruleList = new LinkedList<>();
int page = 1;
int pageSize = 500;
- int loaded = 0;
+ long loaded = 0;
while (true) {
GetRequest getRequest = new GetRequest(getUrl(qualityProfileKey, page, pageSize));
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/storage/Storage.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/storage/Storage.java
index 752d2dfaca5..4d1cfaf8ddc 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/storage/Storage.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/storage/Storage.java
@@ -186,8 +186,6 @@ public class Storage<V> {
/**
* Removes everything in the specified group.
- *
- * @param group The group name.
*/
public Storage<V> clear(Object key) {
resetKey(key);
@@ -236,7 +234,6 @@ public class Storage<V> {
* Returns the set of cache keys associated with this group.
* TODO implement a lazy-loading equivalent with Iterator/Iterable
*
- * @param group The group.
* @return The set of cache keys for this group.
*/
@SuppressWarnings("rawtypes")
diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/TextLineNumber.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/TextLineNumber.java
index 050dd457503..14f4ec833ee 100644
--- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/TextLineNumber.java
+++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/TextLineNumber.java
@@ -197,7 +197,6 @@ public class TextLineNumber extends JPanel implements CaretListener, DocumentLis
* <li>TextLineNumber.CENTER
* <li>TextLineNumber.RIGHT (default)
* </ul>
- * @param currentLineForeground the Color used to render the current line
*/
public void setDigitAlignment(float digitAlignment) {
this.digitAlignment = digitAlignment > 1.0f ? 1.0f : digitAlignment < 0.0f ? -1.0f : digitAlignment;