Changed to ConcurrentSkipListMap to preserve order
Some checks failed
bld-ci / build-bld-project (17, 1.9.24) (push) Has been cancelled
bld-ci / build-bld-project (17, 2.0.21) (push) Has been cancelled
bld-ci / build-bld-project (21, 1.9.24) (push) Has been cancelled
bld-ci / build-bld-project (21, 2.0.21) (push) Has been cancelled
bld-ci / build-bld-project (23, 1.9.24) (push) Has been cancelled
bld-ci / build-bld-project (23, 2.0.21) (push) Has been cancelled
javadocs-pages / deploy (push) Has been cancelled

This commit is contained in:
Erik C. Thauvin 2024-10-27 16:54:11 -07:00
parent aa8d50d4cb
commit b8a02dce9e
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 6 additions and 5 deletions

View file

@ -24,7 +24,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentSkipListMap;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -33,15 +33,16 @@ import java.util.stream.Collectors;
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0 * @since 1.0
*/ */
@SuppressWarnings("PMD.UseConcurrentHashMap")
public class SourceSet { public class SourceSet {
private final Collection<File> classpath_ = new ArrayList<>(); private final Collection<File> classpath_ = new ArrayList<>();
private final Map<String, String> dependentSourceSets_ = new ConcurrentHashMap<>(); private final Map<String, String> dependentSourceSets_ = new ConcurrentSkipListMap<>();
private final Collection<DocumentedVisibility> documentedVisibilities_ = new ArrayList<>(); private final Collection<DocumentedVisibility> documentedVisibilities_ = new ArrayList<>();
private final Map<String, String> externalDocumentationLinks_ = new ConcurrentHashMap<>(); private final Map<String, String> externalDocumentationLinks_ = new ConcurrentSkipListMap<>();
private final Collection<File> includes_ = new ArrayList<>(); private final Collection<File> includes_ = new ArrayList<>();
private final Collection<String> perPackageOptions_ = new ArrayList<>(); private final Collection<String> perPackageOptions_ = new ArrayList<>();
private final Collection<File> samples_ = new ArrayList<>(); private final Collection<File> samples_ = new ArrayList<>();
private final Map<String, String> srcLinks_ = new ConcurrentHashMap<>(); private final Map<String, String> srcLinks_ = new ConcurrentSkipListMap<>();
private final Collection<File> src_ = new ArrayList<>(); private final Collection<File> src_ = new ArrayList<>();
private final Collection<File> suppressedFiles_ = new ArrayList<>(); private final Collection<File> suppressedFiles_ = new ArrayList<>();
private AnalysisPlatform analysisPlatform_; private AnalysisPlatform analysisPlatform_;

View file

@ -171,7 +171,7 @@ class SourceSetTest {
var matches = List.of( var matches = List.of(
"-classpath", localPath(PATH_1, PATH_2), "-classpath", localPath(PATH_1, PATH_2),
"-dependentSourceSets", "set1/set2;set3/set4", "-dependentSourceSets", "set1/set2;set3/set4",
"-externalDocumentationLinks", "link3^link4^^link1^link2", "-externalDocumentationLinks", "link1^link2^^link3^link4",
"-perPackageOptions", OPTION_1 + ';' + OPTION_2, "-perPackageOptions", OPTION_1 + ';' + OPTION_2,
"-samples", localPath(SAMPLES_1, SAMPLES_2, SAMPLES_3), "-samples", localPath(SAMPLES_1, SAMPLES_2, SAMPLES_3),
"-suppressedFiles", localPath(SUP_1, SUP_2, SUP_3) "-suppressedFiles", localPath(SUP_1, SUP_2, SUP_3)