Skip to content

Commit bce8dd0

Browse files
authored
Update JDK javadoc links (#24577)
2 parents 0c66c8b + 1f7a870 commit bce8dd0

File tree

13 files changed

+18
-18
lines changed

13 files changed

+18
-18
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,22 +2494,22 @@ class Definitions {
24942494
""".stripMargin)
24952495

24962496
add(Object_wait,
2497-
"""/** See [[https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--]].
2497+
"""/** See [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()]].
24982498
| *
24992499
| * @note not specified by SLS as a member of AnyRef
25002500
| */
25012501
""".stripMargin)
25022502

25032503
add(Object_waitL,
2504-
"""/** See [[https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-]].
2504+
"""/** See [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)]].
25052505
| *
25062506
| * @param timeout the maximum time to wait in milliseconds.
25072507
| * @note not specified by SLS as a member of AnyRef
25082508
| */
25092509
""".stripMargin)
25102510

25112511
add(Object_waitLI,
2512-
"""/** See [[https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-]]
2512+
"""/** See [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)]]
25132513
| *
25142514
| * @param timeout the maximum time to wait in milliseconds.
25152515
| * @param nanos additional time, in nanoseconds range 0-999999.

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ object Types extends TypeUtils {
11021102
* methods of [[java.lang.Object]], that also does not count toward the interface's
11031103
* abstract method count.
11041104
*
1105-
* @see https://docs.oracle.com/javase/8/docs/api/java/lang/FunctionalInterface.html
1105+
* @see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/FunctionalInterface.html
11061106
*
11071107
* @return the set of methods that are abstract and do not match any of [[java.lang.Object]]
11081108
*

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ object Erasure {
463463
* will throw a `NullPointerException` instead. See `lambda-null.scala`
464464
* for test cases.
465465
*
466-
* @see [LambdaMetaFactory](https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/LambdaMetafactory.html)
466+
* @see [LambdaMetaFactory](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/invoke/LambdaMetafactory.html)
467467
*/
468468
def autoAdaptedParam(tp: Type) =
469469
!tp.isErasedValueType && !tp.isPrimitiveValueType

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ trait Implicits:
15811581
/** Check if `ord` respects the contract of `Ordering`.
15821582
*
15831583
* More precisely, we check that its `compare` method respects the invariants listed
1584-
* in https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#compare-T-T-
1584+
* in https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#compare(T,T)
15851585
*/
15861586
def validateOrdering(ord: Ordering[Candidate]): Unit =
15871587
for

compiler/src/dotty/tools/io/Path.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Path private[io] (val jpath: JPath) {
133133
// We don't call JPath#normalize here because it may result in resolving
134134
// to a different path than intended, such as when the given path contains
135135
// a `..` component and the preceding name is a symbolic link.
136-
// https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html#normalize--
136+
// https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/file/Path.html#normalize()
137137
//
138138
// Paths ending with `..` or `.` are handled specially here as
139139
// JPath#getParent wants to simply strip away that last element.

docs/_docs/reference/enums/enums.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ enum Color extends Enum[Color]:
171171
case Red, Green, Blue
172172
```
173173

174-
The type parameter comes from the Java enum [definition](https://docs.oracle.com/javase/8/docs/api/index.html?java/lang/Enum.html) and should be the same as the type of the enum.
174+
The type parameter comes from the Java enum [definition](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html) and should be the same as the type of the enum.
175175
There is no need to provide constructor arguments (as defined in the Java API docs) to `java.lang.Enum` when extending it – the compiler will generate them automatically.
176176

177177
After defining `Color` like that, you can use it like you would a Java enum:

docs/_spec/APPLIEDreference/enums/enums.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ If you want to use the Scala-defined enums as [Java enums](https://docs.oracle.c
168168
enum Color extends Enum[Color] { case Red, Green, Blue }
169169
```
170170

171-
The type parameter comes from the Java enum [definition](https://docs.oracle.com/javase/8/docs/api/index.html?java/lang/Enum.html) and should be the same as the type of the enum.
171+
The type parameter comes from the Java enum [definition](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html) and should be the same as the type of the enum.
172172
There is no need to provide constructor arguments (as defined in the Java API docs) to `java.lang.Enum` when extending it – the compiler will generate them automatically.
173173

174174
After defining `Color` like that, you can use it like you would a Java enum:

library-js/src/scala/concurrent/ExecutionContext.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ trait ExecutionContext {
107107

108108
/**
109109
* An [[ExecutionContext]] that is also a
110-
* Java [[http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html Executor]].
110+
* Java [[http://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/Executor.html Executor]].
111111
*/
112112
trait ExecutionContextExecutor extends ExecutionContext with Executor
113113

114114
/**
115115
* An [[ExecutionContext]] that is also a
116-
* Java [[http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html ExecutorService]].
116+
* Java [[http://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ExecutorService.html ExecutorService]].
117117
*/
118118
trait ExecutionContextExecutorService extends ExecutionContextExecutor with ExecutorService
119119

@@ -175,7 +175,7 @@ object ExecutionContext {
175175
*
176176
* The default `ExecutionContext` implementation is backed by a work-stealing thread pool. By default,
177177
* the thread pool uses a target number of worker threads equal to the number of
178-
* [[https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#availableProcessors-- available processors]].
178+
* [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runtime.html#availableProcessors() available processors]].
179179
*/
180180
implicit final def global: ExecutionContext = ExecutionContext.global
181181
}
@@ -220,7 +220,7 @@ object ExecutionContext {
220220
*/
221221
def fromExecutor(e: Executor): ExecutionContextExecutor = fromExecutor(e, defaultReporter)
222222

223-
/** The default reporter simply prints the stack trace of the `Throwable` to [[http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#err System.err]].
223+
/** The default reporter simply prints the stack trace of the `Throwable` to [[http://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html#err System.err]].
224224
*
225225
* @return the function for error reporting
226226
*/

library/src/scala/collection/StringOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ final class StringOps(private val s: String) extends AnyVal { self =>
796796
* If the separator character is a surrogate character, only split on
797797
* matching surrogate characters if they are not part of a surrogate pair
798798
*
799-
* The behaviour follows, and is implemented in terms of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-">String.split(re: String)</a>
799+
* The behaviour follows, and is implemented in terms of <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#split(java.lang.String)">String.split(re: String)</a>
800800
*
801801
*
802802
* @example {{{

library/src/scala/jdk/StreamConverters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import scala.collection.convert.StreamExtensions
1818
/** This object provides extension methods to create [[java.util.stream.Stream Java Streams]] that
1919
* operate on Scala collections (sequentially or in parallel). For more information on Java
2020
* streams, consult the documentation
21-
* ([[https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html]]).
21+
* ([[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/package-summary.html]]).
2222
*
2323
* When writing Java code, use the explicit conversion methods defined in
2424
* [[javaapi.StreamConverters]] instead.

0 commit comments

Comments
 (0)