]> source.dussan.org Git - sonarqube.git/commitdiff
Fix bugs, mainly about type casts
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 17 Oct 2018 20:45:41 +0000 (22:45 +0200)
committerSonarTech <sonartech@sonarsource.com>
Thu, 18 Oct 2018 18:20:55 +0000 (20:20 +0200)
27 files changed:
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueCounter.java
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStep.java
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStep.java
server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java
server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java
server/sonar-server/src/main/java/org/sonar/server/app/ProgrammaticLogbackValve.java
server/sonar-server/src/main/java/org/sonar/server/authentication/JwtSerializer.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/IndexAction.java
server/sonar-server/src/main/java/org/sonar/server/property/ws/IndexAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java
server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleQueryFactory.java
server/sonar-server/src/main/java/org/sonar/server/rule/ws/UpdateAction.java
server/sonar-server/src/main/java/org/sonar/server/setting/ws/ListDefinitionsAction.java
server/sonar-server/src/main/java/org/sonar/server/setting/ws/ValuesAction.java
server/sonar-server/src/main/java/org/sonar/server/webhook/ws/DeleteAction.java
server/sonar-server/src/main/java/org/sonar/server/webhook/ws/UpdateAction.java
server/sonar-server/src/main/java/org/sonar/server/webhook/ws/WebhookDeliveriesAction.java
sonar-core/src/main/java/org/sonar/core/config/SecurityProperties.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/storage/Storage.java
sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/TextLineNumber.java

index c64942f5890f6a6247641f02abde1ba12d0b083f..b4c193ec945c92d17d7e88cb8e5db4c4d9a34ed9 100644 (file)
  */
 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);
index 17e1df16efb6d284d39772bd4b641b6f64834fe4..92e5c4bedb6c9b72606f7d87cd36c02a912c1d50 100644 (file)
@@ -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());
index cefa5bb456807076ed279f4d3c540125600436a5..a69c858824a41ca0c813bd158fcc012f9e6b6529 100644 (file)
@@ -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)
index fd830f733f90cc025a41a1f8244dc0fa2eca2acb..6062caa9a6734c0b7efbdd615e41b8f3e57cff88 100644 (file)
@@ -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);
   }
index 79ba984c3fea7a907ff6a45f602b5f46cfce3efa..1df8194edf7af69f157ec2b7ba5a7088e03827f3 100644 (file)
@@ -169,29 +169,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.
    */
index abf2f306ed30afd1b5fa936237676879f8c47db3..c047bbb64cf8cfe2127e00548870da028ce557de 100644 (file)
@@ -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);
   }
index 0d19dbff9348e38445aac93064a10885bb0603f2..37568ec8bfb810cb18b4266b1d307f52682b38e3 100644 (file)
@@ -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();
   }
 
index 110d8d20543faa93ee4316767297686b5d2195f3..edeb65e51b60379b9a5cdf47b0b48756152655ef 100644 (file)
@@ -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);
index 4635a785193f0832bbfd967882e94b9c9b825631..fa2f75c89b36f63556d105fd45274a561add982f 100644 (file)
@@ -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();
   }
index bc3a59c55fd6a5cc4e88b7f20afa115f76791c8c..7370d306fba2b569153e0f000d0cebd702d34c1c 100644 (file)
@@ -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) {
index 959eba1dc318f0d76e51bef34f58ed6493a9f42c..395863d6b021e2a1b1c86569c263cae4577b7293 100644 (file)
@@ -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);
   }
 }
index d9486ceeba572b3c6b8a1cfe23d0e040ffc7f0cf..782e528428b5fc7f1793fe6133fa736e52df7108 100644 (file)
@@ -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()
index e42019715cd1228137e4ce2628c8f400e9d81956..3e302d20da27ac4351f7980594eac59f2634a98d 100644 (file)
@@ -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));
index 7af3bd74d13e88504d80153a063c5076e6c16aaf..cdd63dd6cafabc9730a85253a9d164ff3031f501 100644 (file)
@@ -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));
index cf100e7551d16b38faef47d80d3d9bc1b9f6a160..a40fd1c0ada449e51c54fc27728a0cbce26279ac 100644 (file)
@@ -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");
 
index 2bce3356cb3f4d440b18f7048c5b0c521e31fb8e..86752e3df896390b2f683e86566de1f2df2975ab 100644 (file)
@@ -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")
index c96ae59ab490628067f2d678d5f80b72a8a3eca1..66048b40882840f2ba197e0b32469799e0a5ff5c 100644 (file)
@@ -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'",
index 4325ff8e6dc61ae38cc064311fb0da17bd1f1f90..bdcc7973cec37664f202af6e72f9127b30b342e4 100644 (file)
@@ -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*");
 
index c7ed814898fb1523dd7ad076d62c32fde582aa1c..2dc91e509f9eb31094054a73aa2f604cc40fc9e2 100644 (file)
@@ -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>" +
index ec2d3a0ee236ecffd8fc9bacd44c784b14d89355..7842da02318f1670a9d8f6024a34f52ec456fb26 100644 (file)
@@ -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>" +
index 235c3e8a1b89a0dae802084bca85142c2c3583cf..cb674b07fe34905f337598fdc7d64bf5e08cf27d 100644 (file)
@@ -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);
 
index c74a1f8f4f30eca634eab698ab38b6d6768f0e0c..3ed56e58b3a2d3da4f46ac571ff645031faae46e 100644 (file)
@@ -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);
 
index 0ae3dd4a7778830a4fa80abc62384221a737b7e7..f485ff153c466dc8e3de8dd97846f27b9243035a 100644 (file)
@@ -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);
 
index 5836bd416f2a0bda3fe3d390ec24a980b3411951..1bf16eb7edc2b89de8d20279775fb72f0472a34f 100644 (file)
@@ -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)
index 3eaed17e31bb2b522f239498d57dfd38f72fbcb9..128afb4f50e7bdf68f90529fafbb8b9572f0705a 100644 (file)
@@ -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));
index 752d2dfaca5ef75c61e6fffa885e2f16152cd437..4d1cfaf8ddcb249eea3866d83b058172cee7892b 100644 (file)
@@ -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")
index 050dd45750320125a892202ef4a24574f92e8f05..14f4ec833ee72bc9da175aafdb49cca70de09dee 100644 (file)
@@ -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;