diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/TestMethodsCache.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/TestMethodsCache.java
index 754b8e1fcd5..29c4cb69362 100644
--- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/TestMethodsCache.java
+++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/TestMethodsCache.java
@@ -24,17 +24,17 @@
class TestMethodsCache {
/**
* An AutoCloseable
that can contain nested instances and can run a
- * Runnable
upon closing the outer instance.
+ * Runnable
upon creating the outer instance.
*
* Example:
*
*
* - * try (var outer= new NestedAutoCloseable(() -> System.out.println("Bye bye outer"))) { - * try (var inner= new NestedAutoCloseable(() -> System.out.println("Bye bye inner"))) { + * try (var outer= new NestedAutoCloseable(() -> System.out.println("Hello outer"))) { // prints "Hello outer" + * try (var inner= new NestedAutoCloseable(() -> System.out.println("Hello inner"))) { // doesn't print anything * // ... - * } // doesn't print anything - * } // prints "Bye bye outer" + * } + * } **/ private static class NestedAutoCloseable implements AutoCloseable {