olamy commented on code in PR #3432:
URL: https://github.com/apache/maven-surefire/pull/3432#discussion_r3795127328


##########
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java:
##########
@@ -208,6 +208,42 @@ private Stream<TestIdentifier> 
collectAllTestIdentifiersInHierarchy(TestIdentifi
                 .orElseGet(Stream::empty);
     }
 
+    /**
+     * Build a {@code [outer][inner]} suffix from every JUnit Jupiter
+     * {@code [class-template-invocation:#N]} unique-id segment. Nested
+     * {@code @ParameterizedClass} declarations emit more than one; taking only
+     * the last would collapse outer #1/inner #1 with outer #2/inner #1.
+     *
+     * @param uniqueId the platform unique id string
+     * @return the suffix, or an empty string when the id has no 
class-template invocation
+     */
+    private static String extractClassTemplateInvocationSuffix(String 
uniqueId) {
+        if (uniqueId == null) {
+            return "";
+        }
+        String marker = "[class-template-invocation:";

Review Comment:
   Is there anything available to extract segments from a uniqueId 
representation rather than parsing manually?
   Maybe?
   ```
   UniqueId.parse(uniqueId).getSegments()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to