Skip to content

Commit 24d0160

Browse files
committed
Restore TestPlan.getTestIdentifier(String) because it's used by Gradle
1 parent 39d3d73 commit 24d0160

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

documentation/src/docs/asciidoc/release-notes/release-notes-6.0.0-M1.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ repository on GitHub.
6363
- `LegacyReportingUtils` class
6464
- `TestPlan.add(TestIdentifier)`, `TestPlan.getChildren(String)`, and
6565
`TestPlan.getTestIdentifier(String)` methods
66+
- `TestPlan.add(TestIdentifier)` and `TestPlan.getChildren(String)` methods
6667
- `@UseTechnicalNames` annotation
6768
- `EngineTestKit.execute(String, EngineDiscoveryRequest)`,
6869
`EngineTestKit.execute(TestEngine, EngineDiscoveryRequest)`, and

junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestPlan.java

+18
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import static java.util.Collections.emptySet;
1414
import static java.util.Collections.synchronizedSet;
1515
import static java.util.Collections.unmodifiableSet;
16+
import static org.apiguardian.api.API.Status.DEPRECATED;
1617
import static org.apiguardian.api.API.Status.EXPERIMENTAL;
1718
import static org.apiguardian.api.API.Status.INTERNAL;
1819
import static org.apiguardian.api.API.Status.MAINTAINED;
@@ -172,6 +173,23 @@ public Set<TestIdentifier> getChildren(UniqueId parentId) {
172173
return children.containsKey(parentId) ? unmodifiableSet(children.get(parentId)) : emptySet();
173174
}
174175

176+
/**
177+
* Get the {@link TestIdentifier} with the supplied unique ID.
178+
*
179+
* @param uniqueId the unique ID to look up the identifier for; never
180+
* {@code null} or blank
181+
* @return the identifier with the supplied unique ID; never {@code null}
182+
* @throws PreconditionViolationException if no {@code TestIdentifier}
183+
* with the supplied unique ID is present in this test plan
184+
* @deprecated Use {@link #getTestIdentifier(UniqueId)}
185+
*/
186+
@API(status = DEPRECATED, since = "1.10", consumers = "Gradle")
187+
@Deprecated
188+
public TestIdentifier getTestIdentifier(String uniqueId) throws PreconditionViolationException {
189+
Preconditions.notBlank(uniqueId, "unique ID must not be null or blank");
190+
return getTestIdentifier(UniqueId.parse(uniqueId));
191+
}
192+
175193
/**
176194
* Get the {@link TestIdentifier} with the supplied unique ID.
177195
*

0 commit comments

Comments
 (0)