reta commented on code in PR #3711:
URL: https://github.com/apache/cxf/pull/3711#discussion_r4553644908


##########
rt/rs/description-common-openapi/src/main/java/org/apache/cxf/jaxrs/common/openapi/DefaultApplicationFactory.java:
##########
@@ -42,8 +42,13 @@ static class DefaultApplication extends Application {
 
         DefaultApplication(final List<ClassResourceInfo> cris, final 
Set<String> resourcePackages) {
             this.serviceClasses = 
cris.stream().map(ClassResourceInfo::getServiceClass).
-                    filter(cls -> (resourcePackages == null || 
resourcePackages.isEmpty()) || resourcePackages.stream().
-                            anyMatch(pkg -> 
cls.getPackage().getName().startsWith(pkg))).collect(Collectors.toSet());
+                    filter(cls -> {
+                        if (resourcePackages == null || 
resourcePackages.isEmpty()) {
+                            return true;
+                        }
+                        final String name = cls.getPackage().getName();
+                        return resourcePackages.stream().anyMatch(pkg -> 
name.equals(pkg) || name.startsWith(pkg + '.'));

Review Comment:
   @sharanggupta the packages is a list, you could provide the package name 
with separator if needed, fe `com.acme.order.`, would that work?



-- 
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