arturobernalg opened a new pull request, #3554: URL: https://github.com/apache/maven-surefire/pull/3554
`ResolvedTest#fromFullyQualifiedClass` stripped the trailing `.*` from a dotted pattern, turned the remaining dots into slashes, then re-appended `.*` as a single path segment. For a package wildcard like `dev.aspectj.*` that produced `dev/aspectj.*`, an Ant pattern that matches a class file named `aspectj` with any suffix inside a `dev` folder, not every class inside `dev/aspectj`. The slash form `dev/aspectj/*` and the class-prefix form `dev.aspectj.MyO*` were unaffected, which is why only the documented `another.package.*` example was broken. The same code path also has to keep `my.package.MyTest.*` working, where the wildcard means "this class and its nested classes" rather than "every class in the package", and the dot notation alone cannot tell the two apart. Since Java naming convention has packages start with a lowercase letter and classes with an uppercase one, and that is exactly the convention the plugin's own example follows, the fix uses the case of the last segment before `.*` to choose between emitting `clsName/*` (package wildcard) and `clsName.*` (class name, unchanged behaviour). Added coverage in `ResolvedTestTest` and `TestListResolverTest` for the `dev.aspectj.*` case, and confirmed the existing `MyTest.*` nested-class case still passes. Ran the full surefire-api suite plus checkstyle locally. --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
