Skip to content

Commit c820c27

Browse files
fzhinkinSpace Team
authored andcommitted
[NFC] Update invalid references in stdlib KDoc
Merge-request: KT-MR-22767 Merged-by: Filipp Zhinkin <[email protected]>
1 parent 1e41d14 commit c820c27

File tree

7 files changed

+27
-22
lines changed

7 files changed

+27
-22
lines changed

kotlin-native/runtime/src/main/kotlin/kotlin/native/BitSet.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
232232
* (if [lookFor] == false) bit after [startIndex] (inclusive).
233233
* Returns -1 (for [lookFor] == true) or [size] (for lookFor == false)
234234
* if there is no such bits between [startIndex] and [size] - 1.
235-
* @throws IndexOutOfBoundException if [startIndex] < 0.
235+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
236236
*/
237237
private fun nextBit(startIndex: Int, lookFor: Boolean): Int {
238238
if (startIndex < 0) {
@@ -266,7 +266,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
266266
/**
267267
* Returns an index of a next bit which value is `true` after [startIndex] (inclusive).
268268
* Returns -1 if there is no such bits after [startIndex].
269-
* @throws IndexOutOfBoundException if [startIndex] < 0.
269+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
270270
*/
271271
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
272272
public actual fun nextSetBit(startIndex: Int = 0): Int = nextBit(startIndex, true)
@@ -275,7 +275,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
275275
* Returns an index of a next bit which value is `false` after [startIndex] (inclusive).
276276
* Returns [size] if there is no such bits between [startIndex] and [size] - 1 assuming that the set has an infinite
277277
* sequence of `false` bits after (size - 1)-th.
278-
* @throws IndexOutOfBoundException if [startIndex] < 0.
278+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
279279
*/
280280
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
281281
public actual fun nextClearBit(startIndex: Int = 0): Int = nextBit(startIndex, false)
@@ -329,7 +329,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
329329
* Returns the biggest index of a bit which value is `true` before [startIndex] (inclusive).
330330
* Returns -1 if there is no such bits before [startIndex] or if [startIndex] == -1.
331331
* If [startIndex] >= size will search from (size - 1)-th bit.
332-
* @throws IndexOutOfBoundException if [startIndex] < -1.
332+
* @throws IndexOutOfBoundsException if [startIndex] < -1.
333333
*/
334334
public fun previousSetBit(startIndex: Int): Int = previousBit(startIndex, true)
335335

@@ -338,7 +338,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
338338
* Returns -1 if there is no such bits before [startIndex] or if [startIndex] == -1.
339339
* If [startIndex] >= size will return [startIndex] assuming that the set has an infinite
340340
* sequence of `false` bits after (size - 1)-th.
341-
* @throws IndexOutOfBoundException if [startIndex] < -1.
341+
* @throws IndexOutOfBoundsException if [startIndex] < -1.
342342
*/
343343
public fun previousClearBit(startIndex: Int): Int = previousBit(startIndex, false)
344344

libraries/stdlib/jvm/src/kotlin/text/StringsJVM.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public inline fun String(stringBuilder: java.lang.StringBuilder): String =
570570
* for more details on function's behavior.
571571
*
572572
* @param index the index of [Char] whose codepoint value is needed.
573-
* @throws IndexOutOfBoundsException if the [index] is negative or greater or equal to [length] of this string.
573+
* @throws IndexOutOfBoundsException if the [index] is negative or greater or equal to [length][String.length] of this string.
574574
*
575575
* @sample samples.text.StringsJvmSpecific.codePointAt
576576
*/
@@ -585,7 +585,7 @@ public inline fun String.codePointAt(index: Int): Int = (this as java.lang.Strin
585585
* for more details on function's behavior.
586586
*
587587
* @param index the index of a [Char] which follows a codepoint value that will be returned.
588-
* @throws IndexOutOfBoundsException if the [index] is less than 1, or exceeds the [length] of this string.
588+
* @throws IndexOutOfBoundsException if the [index] is less than 1, or exceeds the [length][String.length] of this string.
589589
*
590590
* @sample samples.text.StringsJvmSpecific.codePointBefore
591591
*/
@@ -602,7 +602,7 @@ public inline fun String.codePointBefore(index: Int): Int = (this as java.lang.S
602602
* @param beginIndex the index of a [Char] corresponding to a beginning of the text range (inclusive).
603603
* @param endIndex the index of a [Char] corresponding to an end of the text range (exclusive).
604604
*
605-
* @throws IndexOutOfBoundsException when either of the indices is negative, exceeds [length] of this string, or
605+
* @throws IndexOutOfBoundsException when either of the indices is negative, exceeds [length][String.length] of this string, or
606606
* when [beginIndex] is greater than [endIndex].
607607
*
608608
* @sample samples.text.StringsJvmSpecific.codePointCount

libraries/stdlib/native-wasm/src/kotlin/native/BitSet.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ internal expect class BitSet constructor(size: Int = BIT_SET_ELEMENT_SIZE) {
3434
/**
3535
* Returns an index of a next bit which value is `true` after [startIndex] (inclusive).
3636
* Returns -1 if there is no such bits after [startIndex].
37-
* @throws IndexOutOfBoundException if [startIndex] < 0.
37+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
3838
*/
3939
fun nextSetBit(startIndex: Int = 0): Int
4040

4141
/**
4242
* Returns an index of a next bit which value is `false` after [startIndex] (inclusive).
4343
* Returns [size] if there is no such bits between [startIndex] and [size] - 1 assuming that the set has an infinite
4444
* sequence of `false` bits after (size - 1)-th.
45-
* @throws IndexOutOfBoundException if [startIndex] < 0.
45+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
4646
*/
4747
fun nextClearBit(startIndex: Int = 0): Int
4848

libraries/stdlib/src/kotlin/concurrent/atomics/AtomicArrays.common.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import kotlin.internal.InlineOnly
2020
* When targeting the Native backend, [AtomicIntArray] stores an [IntArray] and atomically updates it's elements.
2121
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
2222
*
23-
* When targeting the JVM, instances of [AtomicIntArray] are represented by [java.util.concurrent.atomic.AtomicIntegerArray].
23+
* When targeting the JVM, instances of [AtomicIntArray] are represented by
24+
* [java.util.concurrent.atomic.AtomicIntegerArray](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicIntegerArray.html).
2425
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
2526
*
2627
* For JS and Wasm [AtomicIntArray] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
@@ -288,7 +289,8 @@ public expect inline fun AtomicIntArray.fetchAndUpdateAt(index: Int, transform:
288289
* When targeting the Native backend, [AtomicLongArray] stores a [LongArray] and atomically updates it's elements.
289290
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
290291
*
291-
* When targeting the JVM, instances of [AtomicLongArray] are represented by [java.util.concurrent.atomic.AtomicLongArray].
292+
* When targeting the JVM, instances of [AtomicLongArray] are represented by
293+
* [java.util.concurrent.atomic.AtomicLongArray](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLongArray.html).
292294
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
293295
*
294296
* For JS and Wasm [AtomicLongArray] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
@@ -555,7 +557,8 @@ public expect inline fun AtomicLongArray.fetchAndUpdateAt(index: Int, transform:
555557
* When targeting the Native backend, [AtomicArray] stores an [Array] with elements of type [T] and atomically updates it's elements.
556558
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
557559
*
558-
* When targeting the JVM, instances of [AtomicArray] are represented by [java.util.concurrent.atomic.AtomicReferenceArray].
560+
* When targeting the JVM, instances of [AtomicArray] are represented by
561+
* [java.util.concurrent.atomic.AtomicReferenceArray](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReferenceArray.html).
559562
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
560563
*
561564
* For JS and Wasm [AtomicArray] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
@@ -567,7 +570,6 @@ public expect class AtomicArray<T> {
567570
/**
568571
* Creates a new [AtomicArray] filled with elements of the given [array].
569572
*
570-
* @see atomicArrayOf
571573
* @see atomicArrayOfNulls
572574
*
573575
* @sample samples.concurrent.atomics.AtomicArray.arrCons
@@ -654,7 +656,6 @@ public expect class AtomicArray<T> {
654656
*
655657
* @throws RuntimeException if the specified [size] is negative.
656658
*
657-
* @see atomicArrayOf
658659
* @see atomicArrayOfNulls
659660
*
660661
* @sample samples.concurrent.atomics.AtomicArray.initCons

libraries/stdlib/src/kotlin/concurrent/atomics/Atomics.common.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import kotlin.internal.InlineOnly
2020
* When targeting the Native backend, [AtomicInt] stores a volatile [Int] variable and atomically updates it.
2121
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
2222
*
23-
* When targeting the JVM, instances of [AtomicInt] are represented by [java.util.concurrent.atomic.AtomicInteger].
23+
* When targeting the JVM, instances of [AtomicInt] are represented by
24+
* [java.util.concurrent.atomic.AtomicInteger](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicInteger.html).
2425
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
2526
*
2627
* For JS and Wasm [AtomicInt] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
@@ -238,7 +239,8 @@ public expect inline fun AtomicInt.updateAndFetch(transform: (Int) -> Int): Int
238239
* When targeting the Native backend, [AtomicLong] stores a volatile [Long] variable and atomically updates it.
239240
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
240241
*
241-
* When targeting the JVM, instances of [AtomicLong] are represented by [java.util.concurrent.atomic.AtomicLong].
242+
* When targeting the JVM, instances of [AtomicLong] are represented by
243+
* [java.util.concurrent.atomic.AtomicLong](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html).
242244
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
243245
*
244246
* For JS and Wasm [AtomicLong] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
@@ -455,7 +457,8 @@ public expect inline fun AtomicLong.updateAndFetch(transform: (Long) -> Long): L
455457
* When targeting the Native backend, [AtomicBoolean] stores a volatile [Boolean] variable and atomically updates it.
456458
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
457459
*
458-
* When targeting the JVM, instances of [AtomicBoolean] are represented by [java.util.concurrent.atomic.AtomicInteger].
460+
* When targeting the JVM, instances of [AtomicBoolean] are represented by
461+
* [java.util.concurrent.atomic.AtomicBoolean](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicBoolean.html).
459462
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
460463
*
461464
* For JS and Wasm [AtomicBoolean] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
@@ -524,7 +527,8 @@ public expect class AtomicBoolean public constructor(value: Boolean) {
524527
* When targeting the Native backend, [AtomicReference] stores a volatile variable of type [T] and atomically updates it.
525528
* For additional details about atomicity guarantees for reads and writes see [kotlin.concurrent.Volatile].
526529
*
527-
* When targeting the JVM, instances of [AtomicReference] are represented by [java.util.concurrent.atomic.AtomicReference].
530+
* When targeting the JVM, instances of [AtomicReference] are represented by
531+
* [java.util.concurrent.atomic.AtomicReference](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html).
528532
* For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
529533
*
530534
* For JS and Wasm [AtomicReference] is implemented trivially and is not thread-safe since these platforms do not support multi-threading.

libraries/stdlib/src/kotlin/time/Clocks.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
package kotlin.time
77

88
/**
9-
* Creates a [Clock] that uses the [time mark at the moment of creation][TimeMark.markNow] to determine how [far][TimeMark.elapsedNow]
9+
* Creates a [Clock] that uses the [time mark at the moment of creation][TimeSource.markNow] to determine how [far][TimeMark.elapsedNow]
1010
* the [current moment][Clock.now] is from the [origin].
1111
*
1212
* This clock stores the [TimeMark] at the moment of creation, so repeatedly creating [Clock]s from the same [TimeSource] results

libraries/stdlib/wasm/src/kotlin/text/regex/BitSet.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
163163
* (if [lookFor] == false) bit after [startIndex] (inclusive).
164164
* Returns -1 (for [lookFor] == true) or [size] (for lookFor == false)
165165
* if there is no such bits between [startIndex] and [size] - 1.
166-
* @throws IndexOutOfBoundException if [startIndex] < 0.
166+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
167167
*/
168168
private fun nextBit(startIndex: Int, lookFor: Boolean): Int {
169169
if (startIndex < 0) {
@@ -197,7 +197,7 @@ actual constructor(size: Int = ELEMENT_SIZE) {
197197
/**
198198
* Returns an index of a next bit which value is `true` after [startIndex] (inclusive).
199199
* Returns -1 if there is no such bits after [startIndex].
200-
* @throws IndexOutOfBoundException if [startIndex] < 0.
200+
* @throws IndexOutOfBoundsException if [startIndex] < 0.
201201
*/
202202
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
203203
actual fun nextSetBit(startIndex: Int = 0): Int = nextBit(startIndex, true)

0 commit comments

Comments
 (0)