diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java index 517ee073f273..dd18b8d13cd6 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java @@ -933,21 +933,22 @@ public static String getFullyQualifiedMethodName(Class clazz, Method method) */ public static String getFullyQualifiedMethodName(Class clazz, String methodName, Class... parameterTypes) { Preconditions.notNull(clazz, "Class must not be null"); - Preconditions.notBlank(methodName, "Method name must not be null or blank"); return getFullyQualifiedMethodName(clazz.getName(), methodName, ClassUtils.nullSafeToString(parameterTypes)); } /** * Build the fully qualified method name for the method described by the - * supplied class, method name, and parameter types. + * supplied class name, method name, and parameter types. * *

Note that the class is not necessarily the class in which the method is * declared. * - * @param className the name of the class from which the method should be referenced; never {@code null} + * @param className the name of the class from which the method should be referenced; + * never {@code null} * @param methodName the name of the method; never {@code null} or blank - * @param parameterTypeNames the parameter type names of the method; may be empty but not {@code null} + * @param parameterTypeNames the parameter type names of the method; may be + * empty but not {@code null} * @return fully qualified method name; never {@code null} * @since 1.11 */ diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java index 42dcdeef863b..0b45e4ed637a 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java @@ -306,9 +306,10 @@ private static TwoPartSplitResult splitIntoTwo(String value, int index, int leng public interface TwoPartSplitResult { /** - * Maps the result of splitting a string into two parts or throw an exception. + * Map the result of splitting a string into two parts or throw an exception. * - * @param onePartExceptionCreator the exception creator to use if the string was split into a single part + * @param onePartExceptionCreator the exception creator to use if the string + * was split into a single part * @param twoPartsMapper the mapper to use if the string was split into two parts */ default T mapTwo(Supplier onePartExceptionCreator, @@ -320,7 +321,7 @@ default T mapTwo(Supplier onePartExceptionCreato } /** - * Maps the result of splitting a string into up to two parts. + * Map the result of splitting a string into up to two parts. * * @param onePartMapper the mapper to use if the string was split into a single part * @param twoPartsMapper the mapper to use if the string was split into two parts @@ -340,7 +341,7 @@ private static final class OnePart implements TwoPartSplitResult { @Override public T map(Function onePartMapper, BiFunction twoPartsMapper) { - return onePartMapper.apply(value); + return onePartMapper.apply(this.value); } } @@ -357,7 +358,7 @@ private static final class TwoParts implements TwoPartSplitResult { @Override public T map(Function onePartMapper, BiFunction twoPartsMapper) { - return twoPartsMapper.apply(first, second); + return twoPartsMapper.apply(this.first, this.second); } } diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java index 3bb444602cb8..7c18320eba67 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java @@ -93,7 +93,6 @@ public ClasspathResourceSelector convert(String value) { } static class Iteration implements ITypeConverter { - @Override public IterationSelector convert(String value) { DiscoverySelectorIdentifier identifier = DiscoverySelectorIdentifier.create( @@ -101,11 +100,9 @@ public IterationSelector convert(String value) { return (IterationSelector) DiscoverySelectors.parse(identifier) // .orElseThrow(() -> new PreconditionViolationException("Invalid format: Failed to parse selector")); } - } static class Identifier implements ITypeConverter { - @Override public DiscoverySelectorIdentifier convert(String value) { return DiscoverySelectorIdentifier.parse(value); diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java index 342f536ca2ce..d3faa984fd5f 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java @@ -33,12 +33,16 @@ public interface DiscoverySelector { /** * Return the {@linkplain DiscoverySelectorIdentifier identifier} of this * selector. - *

- * The returned identifier has to be parsable by a corresponding + * + *

The returned identifier must be parsable by a corresponding * {@link DiscoverySelectorIdentifierParser}. * - * @return the identifier of this selector or empty if it is not supported; - * never {@code null} + *

The default implementation returns {@link Optional#empty()}. Can be + * overridden by concrete implementations. + * + * @return an {@link Optional} containing the identifier of this selector; + * never {@code null} but potentially empty if the selector does not support + * identifiers * @since 1.11 */ @API(status = EXPERIMENTAL, since = "1.11") diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelectorIdentifier.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelectorIdentifier.java index 4fd926e9b27b..7f4f8e21138f 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelectorIdentifier.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelectorIdentifier.java @@ -20,10 +20,9 @@ import org.junit.platform.commons.util.StringUtils; /** - * Identifier for {@link DiscoverySelector DiscoverySelectors} with a specific - * prefix. - *

- * The {@linkplain #toString() string representation} of an identifier is + * Identifier for a {@link DiscoverySelector} with a specific prefix. + * + *

The {@linkplain #toString() string representation} of an identifier is * intended to be human-readable and is formatted as {@code prefix:value}. * * @since 1.11 @@ -37,7 +36,7 @@ public final class DiscoverySelectorIdentifier { private final String value; /** - * Create a new {@link DiscoverySelectorIdentifier} with the supplied prefix and + * Create a new {@code DiscoverySelectorIdentifier} with the supplied prefix and * value. * * @param prefix the prefix; never {@code null} or blank @@ -51,8 +50,8 @@ public static DiscoverySelectorIdentifier create(String prefix, String value) { * Parse the supplied string representation of a * {@link DiscoverySelectorIdentifier} in the format {@code prefix:value}. * - * @param string the string representation of a {@link DiscoverySelectorIdentifier} - * @return the parsed {@link DiscoverySelectorIdentifier} + * @param string the string representation of a {@code DiscoverySelectorIdentifier} + * @return the parsed {@code DiscoverySelectorIdentifier} * @throws PreconditionViolationException if the supplied string does not * conform to the expected format */ @@ -74,7 +73,7 @@ private DiscoverySelectorIdentifier(String prefix, String value) { * @return the prefix; never {@code null} or blank */ public String getPrefix() { - return prefix; + return this.prefix; } /** @@ -83,7 +82,7 @@ public String getPrefix() { * @return the value; never {@code null} or blank */ public String getValue() { - return value; + return this.value; } @Override @@ -95,12 +94,12 @@ public boolean equals(Object o) { return false; } DiscoverySelectorIdentifier that = (DiscoverySelectorIdentifier) o; - return Objects.equals(prefix, that.prefix) && Objects.equals(value, that.value); + return Objects.equals(this.prefix, that.prefix) && Objects.equals(this.value, that.value); } @Override public int hashCode() { - return Objects.hash(prefix, value); + return Objects.hash(this.prefix, this.value); } /** @@ -109,6 +108,7 @@ public int hashCode() { */ @Override public String toString() { - return String.format("%s:%s", prefix, value); + return String.format("%s:%s", this.prefix, this.value); } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java index a244c23486db..f1dda935b88d 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java @@ -162,5 +162,7 @@ public String getPrefix() { public Optional parse(DiscoverySelectorIdentifier identifier, Context context) { return Optional.of(DiscoverySelectors.selectClass(identifier.getValue())); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java index 1a17cda9119b..eb0aff3fda14 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java @@ -142,5 +142,7 @@ public Optional parse(DiscoverySelectorIdentifier ide } // )); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java index 815edd8373ae..7e41b9ba4310 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java @@ -117,5 +117,7 @@ public Optional parse(DiscoverySelectorIdentifier identif Path path = Paths.get(URI.create(identifier.getValue())); return getFirstElement(DiscoverySelectors.selectClasspathRoots(singleton(path))); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java index 976c20ddb695..77a18048dfde 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java @@ -136,5 +136,7 @@ public String getPrefix() { public Optional parse(DiscoverySelectorIdentifier identifier, Context context) { return Optional.of(DiscoverySelectors.selectDirectory(identifier.getValue())); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParser.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParser.java index 8570c6d5c3cc..071e6b09263d 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParser.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParser.java @@ -19,10 +19,9 @@ import org.junit.platform.engine.DiscoverySelectorIdentifier; /** - * Parser for {@link DiscoverySelectorIdentifier DiscoverySelectorIdentifiers} - * with a specific prefix. - *

- * Implementations of this interface can be registered using the Java service + * Parser for a {@link DiscoverySelectorIdentifier} with a specific prefix. + * + *

Implementations of this interface can be registered using the Java service * loader mechanism to extend the set of supported prefixes for * {@link DiscoverySelectorIdentifier DiscoverySelectorIdentifiers}. * @@ -33,22 +32,23 @@ public interface DiscoverySelectorIdentifierParser { /** - * Get the prefix that this parser can handle. + * Get the prefix that this parser supports. * - * @return the prefix that this parser can handle; never {@code null} + * @return the prefix that this parser supports; never {@code null} or blank */ String getPrefix(); /** * Parse the supplied {@link DiscoverySelectorIdentifier}. - *

- * The JUnit Platform will only invoke this method if the supplied + * + *

The JUnit Platform will only invoke this method if the supplied * {@link DiscoverySelectorIdentifier} has a prefix that matches the value * returned by {@link #getPrefix()}. * * @param identifier the {@link DiscoverySelectorIdentifier} to parse * @param context the {@link Context} to use for parsing - * @return an {@link Optional} containing the parsed {@link DiscoverySelector}; never {@code null} + * @return an {@link Optional} containing the parsed {@link DiscoverySelector}; + * never {@code null} but potentially empty */ Optional parse(DiscoverySelectorIdentifier identifier, Context context); @@ -59,8 +59,8 @@ interface Context { /** * Parse the supplied selector. - *

- * This method is intended to be used by implementations of + * + *

This method is intended to be used by implementations of * {@link DiscoverySelectorIdentifierParser#parse} for selectors that * contain other selectors. */ diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParsers.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParsers.java index 2f0d79b46735..7d379a4fce52 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParsers.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectorIdentifierParsers.java @@ -75,11 +75,13 @@ private enum Singleton { for (DiscoverySelectorIdentifierParser parser : loadedParsers) { DiscoverySelectorIdentifierParser previous = parsersByPrefix.put(parser.getPrefix(), parser); Preconditions.condition(previous == null, - () -> String.format("Duplicate parser for prefix: [%s] candidate a: [%s] candidate b: [%s] ", + () -> String.format("Duplicate parser for prefix: [%s]; candidate a: [%s]; candidate b: [%s]", parser.getPrefix(), requireNonNull(previous).getClass().getName(), parser.getClass().getName())); } this.parsersByPrefix = unmodifiableMap(parsersByPrefix); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java index 5bdbb25fd8d5..1c6964579e13 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java @@ -930,8 +930,8 @@ public static UniqueIdSelector selectUniqueId(String uniqueId) { * * @param parentSelector the parent selector to select iterations for; never * {@code null} - * @param iterationIndices the iteration indices to select; never - * {@code null} or empty + * @param iterationIndices the iteration indices to select; never {@code null} + * or empty * @since 1.9 * @see IterationSelector */ @@ -943,11 +943,12 @@ public static IterationSelector selectIteration(DiscoverySelector parentSelector } /** - * Parse the supplied string representation of a - * {@link DiscoverySelectorIdentifier}. + * Parse the supplied string representation of a {@link DiscoverySelectorIdentifier}. * * @param identifier the string representation of a {@code DiscoverySelectorIdentifier}; * never {@code null} or blank + * @return an {@link Optional} containing the corresponding {@link DiscoverySelector}; + * never {@code null} but potentially empty * @since 1.11 * @see DiscoverySelectorIdentifierParser */ @@ -961,6 +962,8 @@ public static Optional parse(String identifier) { * * @param identifier the {@code DiscoverySelectorIdentifier} to parse; * never {@code null} + * @return an {@link Optional} containing the corresponding {@link DiscoverySelector}; + * never {@code null} but potentially empty * @since 1.11 * @see DiscoverySelectorIdentifierParser */ @@ -975,6 +978,8 @@ public static Optional parse(DiscoverySelectorIdent * * @param identifiers the string representations of * {@code DiscoverySelectorIdentifiers} to parse; never {@code null} + * @return a stream of the corresponding {@link DiscoverySelector DiscoverySelectors}; + * never {@code null} but potentially empty * @since 1.11 * @see DiscoverySelectorIdentifierParser */ @@ -989,6 +994,8 @@ public static Stream parseAll(String... identifiers * * @param identifiers the {@code DiscoverySelectorIdentifiers} to parse; * never {@code null} + * @return a stream of the corresponding {@link DiscoverySelector DiscoverySelectors}; + * never {@code null} but potentially empty * @since 1.11 * @see DiscoverySelectorIdentifierParser */ @@ -996,4 +1003,5 @@ public static Stream parseAll(String... identifiers public static Stream parseAll(Collection identifiers) { return DiscoverySelectorIdentifierParsers.parseAll(identifiers); } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java index 6246fa58e4c3..7cb12802f1d6 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java @@ -112,7 +112,7 @@ public boolean equals(Object o) { @API(status = STABLE, since = "1.3") @Override public int hashCode() { - return Objects.hash(path, position); + return Objects.hash(this.path, this.position); } @Override @@ -158,5 +158,7 @@ public Optional parse(DiscoverySelectorIdentifier identifier, Cont } // )); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java index 965a86cdb379..c5060aed467a 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java @@ -65,14 +65,14 @@ private SortedSet toSortedSet(int[] iterationIndices) { * Get the selected parent {@link DiscoverySelector}. */ public DiscoverySelector getParentSelector() { - return parentSelector; + return this.parentSelector; } /** * Get the selected iteration indices. */ public SortedSet getIterationIndices() { - return iterationIndices; + return this.iterationIndices; } @Override @@ -84,12 +84,12 @@ public boolean equals(Object o) { return false; } IterationSelector that = (IterationSelector) o; - return parentSelector.equals(that.parentSelector) && iterationIndices.equals(that.iterationIndices); + return this.parentSelector.equals(that.parentSelector) && this.iterationIndices.equals(that.iterationIndices); } @Override public int hashCode() { - return Objects.hash(parentSelector, iterationIndices); + return Objects.hash(this.parentSelector, this.iterationIndices); } @Override @@ -104,13 +104,14 @@ public String toString() { @Override public Optional toIdentifier() { - return parentSelector.toIdentifier().map(parentSelectorString -> DiscoverySelectorIdentifier.create( // + return this.parentSelector.toIdentifier().map(parentSelectorString -> DiscoverySelectorIdentifier.create( // IdentifierParser.PREFIX, // String.format("%s[%s]", parentSelectorString, formatIterationIndicesAsRanges())) // ); } private String formatIterationIndicesAsRanges() { + class Range { final int start; int end; @@ -120,10 +121,11 @@ class Range { this.end = start; } } + List ranges = new ArrayList<>(); - Range current = new Range(iterationIndices.first()); + Range current = new Range(this.iterationIndices.first()); ranges.add(current); - for (int n : iterationIndices.tailSet(current.start + 1)) { + for (int n : this.iterationIndices.tailSet(current.start + 1)) { if (n == current.end + 1) { current.end = n; } @@ -133,14 +135,14 @@ class Range { } } return ranges.stream() // - .map(r -> { - if (r.start == r.end) { - return String.valueOf(r.start); + .map(range -> { + if (range.start == range.end) { + return String.valueOf(range.start); } - if (r.start == r.end - 1) { - return r.start + "," + r.end; + if (range.start == range.end - 1) { + return range.start + "," + range.end; } - return r.start + ".." + r.end; + return range.start + ".." + range.end; }) // .collect(joining(",")); } @@ -185,5 +187,7 @@ private IntStream parseIndexDefinition(String value) { Integer.parseInt(lastIndex))// ); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java index 7f6659482311..c2df7e1af657 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java @@ -342,4 +342,5 @@ public Optional parse(DiscoverySelectorIdentifier identifier, Co } } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java index 293654370f8e..140610901155 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java @@ -102,5 +102,7 @@ public String getPrefix() { public Optional parse(DiscoverySelectorIdentifier identifier, Context context) { return Optional.of(DiscoverySelectors.selectModule(identifier.getValue())); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java index cfa1dd6e2500..5c0ae7a542cb 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java @@ -180,5 +180,7 @@ public Optional parse(DiscoverySelectorIdentifier identifie return Optional.of( DiscoverySelectors.selectNestedClass(parts.subList(0, parts.size() - 1), parts.get(parts.size() - 1))); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java index ae5d4a69fdc0..ff117ca99be7 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java @@ -284,5 +284,7 @@ public Optional parse(DiscoverySelectorIdentifier identifi return Optional.of(DiscoverySelectors.selectNestedMethod(enclosingClassNames, nestedClassName, methodName, parameterTypeNames)); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java index fc7da6fb5c6f..21801c7c21ad 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java @@ -102,5 +102,7 @@ public String getPrefix() { public Optional parse(DiscoverySelectorIdentifier identifier, Context context) { return Optional.of(DiscoverySelectors.selectPackage(identifier.getValue())); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java index 08068b1d9ca6..4c0a00ade87c 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java @@ -103,5 +103,7 @@ public String getPrefix() { public Optional parse(DiscoverySelectorIdentifier identifier, Context context) { return Optional.of(DiscoverySelectors.selectUniqueId(identifier.getValue())); } + } + } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java index 9e6ed0c45c8a..eb18583a93da 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java @@ -106,5 +106,7 @@ public String getPrefix() { public Optional parse(DiscoverySelectorIdentifier identifier, Context context) { return Optional.of(DiscoverySelectors.selectUri(identifier.getValue())); } + } + }