Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/core/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2494,22 +2494,22 @@ class Definitions {
""".stripMargin)

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

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

add(Object_waitLI,
"""/** See [[https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-]]
"""/** See [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)]]
| *
| * @param timeout the maximum time to wait in milliseconds.
| * @param nanos additional time, in nanoseconds range 0-999999.
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ object Types extends TypeUtils {
* methods of [[java.lang.Object]], that also does not count toward the interface's
* abstract method count.
*
* @see https://docs.oracle.com/javase/8/docs/api/java/lang/FunctionalInterface.html
* @see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/FunctionalInterface.html
*
* @return the set of methods that are abstract and do not match any of [[java.lang.Object]]
*
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/Erasure.scala
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ object Erasure {
* will throw a `NullPointerException` instead. See `lambda-null.scala`
* for test cases.
*
* @see [LambdaMetaFactory](https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/LambdaMetafactory.html)
* @see [LambdaMetaFactory](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/invoke/LambdaMetafactory.html)
*/
def autoAdaptedParam(tp: Type) =
!tp.isErasedValueType && !tp.isPrimitiveValueType
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ trait Implicits:
/** Check if `ord` respects the contract of `Ordering`.
*
* More precisely, we check that its `compare` method respects the invariants listed
* in https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#compare-T-T-
* in https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#compare(T,T)
*/
def validateOrdering(ord: Ordering[Candidate]): Unit =
for
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/io/Path.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Path private[io] (val jpath: JPath) {
// We don't call JPath#normalize here because it may result in resolving
// to a different path than intended, such as when the given path contains
// a `..` component and the preceding name is a symbolic link.
// https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html#normalize--
// https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/file/Path.html#normalize()
//
// Paths ending with `..` or `.` are handled specially here as
// JPath#getParent wants to simply strip away that last element.
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/reference/enums/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ enum Color extends Enum[Color]:
case Red, Green, Blue
```

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.
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.
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.

After defining `Color` like that, you can use it like you would a Java enum:
Expand Down
2 changes: 1 addition & 1 deletion docs/_spec/APPLIEDreference/enums/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ If you want to use the Scala-defined enums as [Java enums](https://docs.oracle.c
enum Color extends Enum[Color] { case Red, Green, Blue }
```

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.
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.
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.

After defining `Color` like that, you can use it like you would a Java enum:
Expand Down
8 changes: 4 additions & 4 deletions library-js/src/scala/concurrent/ExecutionContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ trait ExecutionContext {

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

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

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

/** 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]].
/** 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]].
*
* @return the function for error reporting
*/
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/collection/StringOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ final class StringOps(private val s: String) extends AnyVal { self =>
* If the separator character is a surrogate character, only split on
* matching surrogate characters if they are not part of a surrogate pair
*
* 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>
* 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>
*
*
* @example {{{
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/jdk/StreamConverters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import scala.collection.convert.StreamExtensions
/** This object provides extension methods to create [[java.util.stream.Stream Java Streams]] that
* operate on Scala collections (sequentially or in parallel). For more information on Java
* streams, consult the documentation
* ([[https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html]]).
* ([[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/package-summary.html]]).
*
* When writing Java code, use the explicit conversion methods defined in
* [[javaapi.StreamConverters]] instead.
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/jdk/javaapi/StreamConverters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import java.{lang => jl}

/** This object contains methods to create Java Streams that operate on Scala collections
* (sequentially or in parallel). For more information on Java streams, consult the documentation
* ([[https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html]]).
* ([[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/package-summary.html]]).
*
* The explicit conversion methods defined here are intended to be used in Java code. For Scala
* code, it is recommended to use the extension methods defined in [[scala.jdk.StreamConverters]].
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/util/matching/Regex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import java.util.regex.{ Pattern, Matcher }
*
* === Usage ===

* This class delegates to the [[https://docs.oracle.com/javase/8/docs/api/java/util/regex/package-summary.html java.util.regex]] package of the Java Platform.
* This class delegates to the [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/package-summary.html java.util.regex]] package of the Java Platform.
* See the documentation for [[java.util.regex.Pattern]] for details about
* the regular expression syntax for pattern strings.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/explicit-nulls/pos/interop-java-varargs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.nio.file.Paths
class S {

// Paths.get is a Java method with two arguments, where the second one
// is a varargs: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Paths.html
// is a varargs: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/file/Paths.html
// static Path get(String first, String... more)
// The Scala compiler converts this signature into
// def get(first: String | Null, more: (String | Null)*)
Expand Down
Loading