Skip to content

Commit

Permalink
Simply code when filterObjecClazz is not null
Browse files Browse the repository at this point in the history
Co-authored-by: BJ Hargrave <[email protected]>
  • Loading branch information
tjwatson and bjhargrave committed Apr 26, 2022
1 parent 7f06cde commit d1a8600
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1077,13 +1077,16 @@ private List<ServiceRegistrationImpl<?>> lookupServiceRegistrations(String clazz
if (filter instanceof FilterImpl) {
// check if we can determine the clazz from the filter
String filterObjectClazz = ((FilterImpl) filter).getRequiredObjectClass();
if (filterObjectClazz != null && ((FilterImpl) filter).getChildren().isEmpty()) {
// this is a simple (objectClass=serviceClass) filter;
// no need to evaluate the filter
filter = null;
if (filterObjectClazz != null) {
result = publishedServicesByClass.get(filterObjectClazz);
if (((FilterImpl) filter).getChildren().isEmpty()) {
// this is a simple (objectClass=serviceClass) filter;
// no need to evaluate the filter
filter = null;
}
} else {
result = allPublishedServices;
}
result = filterObjectClazz == null ? allPublishedServices
: publishedServicesByClass.get(filterObjectClazz);
} else {
// have to check all services
result = allPublishedServices;
Expand Down

0 comments on commit d1a8600

Please sign in to comment.