Skip to content

Commit 8b5d089

Browse files
arukiidoumarcphilipp
authored andcommitted
Remove remnants of Java 8 compatibility from User Guide (#5066)
Resolves #5061.
1 parent b5e1ed5 commit 8b5d089

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

documentation/src/docs/asciidoc/link-attributes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ endif::[]
251251
:Log4j: https://logging.apache.org/log4j/2.x/[Log4j]
252252
:Log4j_JDK_Logging_Adapter: https://logging.apache.org/log4j/2.x/log4j-jul/index.html[Log4j JDK Logging Adapter]
253253
:Logback: https://logback.qos.ch/[Logback]
254-
:LogManager: https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogManager.html[LogManager]
254+
:LogManager: https://docs.oracle.com/en/java/javase/17/docs/api/java.logging/java/util/logging/LogManager.html[LogManager]
255255
:Maven_Central: https://central.sonatype.com/[Maven Central]
256256
:MockitoExtension: https://github.com/mockito/mockito/blob/release/2.x/subprojects/junit-jupiter/src/main/java/org/mockito/junit/jupiter/MockitoExtension.java[MockitoExtension]
257257
:ServiceLoader: {jdk-javadoc-base-url}/java.base/java/util/ServiceLoader.html[ServiceLoader]

documentation/src/docs/asciidoc/release-notes/release-notes-6.0.1.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repository on GitHub.
1616
[[release-notes-6.0.1-junit-platform-bug-fixes]]
1717
==== Bug Fixes
1818

19-
*
19+
* Remove remnants of Java 8 compatibility from User Guide.
2020

2121
[[release-notes-6.0.1-junit-platform-deprecations-and-breaking-changes]]
2222
==== Deprecations and Breaking Changes

documentation/src/docs/asciidoc/user-guide/running-tests.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ option.
11241124
Please consult the manual of your build tool for the appropriate commands.
11251125

11261126
To analyze the recorded events, use the
1127-
https://docs.oracle.com/en/java/javase/14/docs/specs/man/jfr.html[jfr]
1127+
https://docs.oracle.com/en/java/javase/17/docs/specs/man/jfr.html[jfr]
11281128
command line tool shipped with recent JDKs or open the recording file with
11291129
https://jdk.java.net/jmc/[JDK Mission Control].
11301130

documentation/src/docs/asciidoc/user-guide/writing-tests.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,9 +1749,8 @@ test class.
17491749
include::{testDir}/example/ParameterizedClassDemo.java[tags=constructor_injection]
17501750
----
17511751

1752-
If your programming language level you are using supports _records_ -- for example, Java
1753-
16 or higher -- you may use them to implement parameterized classes that avoid the
1754-
boilerplate code of declaring a test class constructor.
1752+
You may use _records_ to implement parameterized classes that avoid the boilerplate code
1753+
of declaring a test class constructor.
17551754

17561755
[source,java,indent=0]
17571756
----
@@ -2237,11 +2236,12 @@ by default. This behavior can be changed by setting the
22372236
| `@CsvSource(value = { " apple , banana" }, ignoreLeadingAndTrailingWhitespace = false)` | `" apple "`, `" banana"`
22382237
|===
22392238

2240-
If the programming language you are using supports _text blocks_ -- for example, Java SE
2241-
15 or higher -- you can alternatively use the `textBlock` attribute of `@CsvSource`. Each
2242-
record within a text block represents a CSV record and results in one invocation of the
2243-
parameterized class or test. The first record may optionally be used to supply CSV headers
2244-
by setting the `useHeadersInDisplayName` attribute to `true` as in the example below.
2239+
If the programming language you are using supports Java _text blocks_ or equivalent
2240+
multi-line string literals, you can alternatively use the `textBlock` attribute of
2241+
`@CsvSource`. Each record within a text block represents a CSV record and results in one
2242+
invocation of the parameterized class or test. The first record may optionally be used to
2243+
supply CSV headers by setting the `useHeadersInDisplayName` attribute to `true` as in the
2244+
example below.
22452245

22462246
Using a text block, the previous example can be implemented as follows.
22472247

@@ -2304,7 +2304,7 @@ void testWithCsvSource(String fruit, int rank) {
23042304

23052305
[NOTE]
23062306
====
2307-
Java's https://docs.oracle.com/en/java/javase/15/text-blocks/index.html[text block]
2307+
Java's https://docs.oracle.com/en/java/javase/17/text-blocks/index.html[text block]
23082308
feature automatically removes _incidental whitespace_ when the code is compiled.
23092309
However other JVM languages such as Groovy and Kotlin do not. Thus, if you are using a
23102310
programming language other than Java and your text block contains comments or new lines

junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
* via this attribute or the {@link #value} attribute.
135135
*
136136
* <p>Text block syntax is supported by various languages on the JVM
137-
* including Java SE 15 or higher. If text blocks are not supported, you
137+
* including Java SE. If text blocks are not supported, you
138138
* should declare your CSV content via the {@link #value} attribute.
139139
*
140140
* <p>Each record in the text block corresponds to a record in a CSV file and will
@@ -154,7 +154,7 @@
154154
* input or on the following line, vertically aligned with the rest of the
155155
* input (as can be seen in the example below).
156156
*
157-
* <p>Java's <a href="https://docs.oracle.com/en/java/javase/15/text-blocks/index.html">text block</a>
157+
* <p>Java's <a href="https://docs.oracle.com/en/java/javase/17/text-blocks/index.html">text block</a>
158158
* feature automatically removes <em>incidental whitespace</em> when the code
159159
* is compiled. However, other JVM languages such as Groovy and Kotlin do not.
160160
* Thus, if you are using a programming language other than Java and your text

junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public final class StringUtils {
4646
* @see <a href="https://github.com/junit-team/junit-framework/issues/1800">#1800</a>
4747
*/
4848
static Pattern compileIsoControlPattern() {
49-
// https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#posix
49+
// https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html#posix
5050
try {
5151
// All of the characters that Unicode refers to as 'control characters'
5252
return Pattern.compile("\\p{Cntrl}", UNICODE_CHARACTER_CLASS);

0 commit comments

Comments
 (0)