Skip to content

Commit

Permalink
ServiceRegistryInitializer: Doing a regex match on service id l… (ape…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbearcsiro authored and mmoayyed committed Jul 1, 2019
1 parent 483837d commit 74274e7
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,11 @@ public void initServiceRegistryIfNecessary() {

private boolean findExistingMatchForService(final RegisteredService r) {
if (StringUtils.isNotBlank(r.getServiceId())) {
val match = this.serviceRegistry.findServiceById(r.getServiceId());
if (match != null && match.getClass().equals(r.getClass())) {
val match = this.serviceRegistry.findServiceByExactServiceId(r.getServiceId());
if (match != null) {
LOGGER.warn("Skipping [{}] JSON service definition as a matching service [{}] is found in the registry", r.getName(), match.getName());
return true;
}
val match2 = this.serviceRegistry.findServiceByExactServiceId(r.getServiceId());
if (match2 != null) {
LOGGER.warn("Skipping [{}] JSON service definition as a matching service [{}] is found in the registry", r.getName(), match2.getName());
return true;
}
}

val match = this.serviceRegistry.findServiceById(r.getId());
Expand Down

0 comments on commit 74274e7

Please sign in to comment.