This commit is contained in:
Daniel Chao
2025-10-16 14:18:49 -07:00
committed by GitHub
parent b8aad85943
commit 80a4dc9617
2 changed files with 4 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ class DocGenerator(
} }
/** /**
* The default exeuctor when running the doc generator. * The default executor when running the doc generator.
* *
* Uses [Executors.newVirtualThreadPerTaskExecutor] if available (JDK 21). Otherwise, uses * Uses [Executors.newVirtualThreadPerTaskExecutor] if available (JDK 21). Otherwise, uses
* [Executors.newFixedThreadPool] with 64 threads, or the number of available processors * [Executors.newFixedThreadPool] with 64 threads, or the number of available processors

View File

@@ -110,7 +110,7 @@ internal data class RuntimeData(
RuntimeDataLink(text = text(ref), href = ref.pageUrlRelativeTo(myRef)) RuntimeDataLink(text = text(ref), href = ref.pageUrlRelativeTo(myRef))
} }
val knownUsages = val knownUsages =
(this.knownUsages + newLinks).distinctByCommparator(comparator).sortedBy { it.text }.toSet() (this.knownUsages + newLinks).distinctByComparator(comparator).sortedBy { it.text }.toSet()
if (knownUsages == this.knownUsages) { if (knownUsages == this.knownUsages) {
return this return this
} }
@@ -128,14 +128,14 @@ internal data class RuntimeData(
RuntimeDataLink(text = ref.displayName, href = ref.pageUrlRelativeTo(myRef)) RuntimeDataLink(text = ref.displayName, href = ref.pageUrlRelativeTo(myRef))
} }
val knownSubtypes = val knownSubtypes =
(this.knownSubtypes + newLinks).distinctByCommparator(comparator).sortedBy { it.text }.toSet() (this.knownSubtypes + newLinks).distinctByComparator(comparator).sortedBy { it.text }.toSet()
if (knownSubtypes == this.knownSubtypes) { if (knownSubtypes == this.knownSubtypes) {
return this return this
} }
return copy(knownSubtypes = knownSubtypes) return copy(knownSubtypes = knownSubtypes)
} }
fun Collection<RuntimeDataLink>.distinctByCommparator( fun Collection<RuntimeDataLink>.distinctByComparator(
comparator: Comparator<String> comparator: Comparator<String>
): Collection<RuntimeDataLink> { ): Collection<RuntimeDataLink> {
val compareBySegment = segmentComparator(comparator) val compareBySegment = segmentComparator(comparator)