Skip to content

Commit

Permalink
Bug Fix : When the Collection of Services is empty the monitor should…
Browse files Browse the repository at this point in the history
… just gracefully return.
  • Loading branch information
koushikr committed Nov 10, 2023
1 parent 5c740be commit 4128c04
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ private void updateRegistry() {
final Map<Service, ServiceFinder<T, R>> updatedFinders = new HashMap<>();
try {
val services = serviceDataSource.services();
if(services.isEmpty()) {
log.debug("No services found for the service data source. Skipping update on the registry");
return;
}
val knownServiceFinders = finders.get();
val newFinders = services.stream()
.filter(service -> !knownServiceFinders.containsKey(service))
Expand Down

0 comments on commit 4128c04

Please sign in to comment.