Source:
<code>public DefaultQuickLinkVisibilityController(QuickLinksProfile profile) throws QuickLinksProfileEvaluationException { int filterCount = size(profile.getFilters()); globalRules = new FilterEvaluator(profile.getFilters()); for (Service service: profile.getServices()) { filterCount += size(service.getFilters()); serviceRules.put(service.getName(), new FilterEvaluator(service.getFilters())); for (Component component: service.getComponents()) { filterCount += size(component.getFilters()); componentRules.put(ServiceComponent.of(service.getName(), component.getName()), new FilterEvaluator(component.getFilters())); } } if (filterCount == 0) { throw new QuickLinksProfileEvaluationException("At least one filter must be defined."); } profile.getFilters().stream() .filter(f -> f instanceof LinkNameFilter && ((LinkNameFilter)f).getLinkUrl() != null) .findAny() <START> .ifPresent(f -> LOG.warn("Link url overrides only work on service and component levels. Global filter: {}", f)); <END> for (Service service : profile.getServices()) { urlOverrides.putAll(getUrlOverrides(service.getName(), service.getFilters())); for (Component component : service.getComponents()) { Map<Pair<String, String>, String> componentUrlOverrides = getUrlOverrides(service.getName(), component.getFilters()); Sets.SetView<Pair<String, String>> duplicateOverrides = Sets.difference(urlOverrides.keySet(), componentUrlOverrides.keySet()); if (!duplicateOverrides.isEmpty()) { LOG.warn("Duplicate url overrides in quick links profile: {}", duplicateOverrides); } urlOverrides.putAll(componentUrlOverrides); } } }</code><technical_language>Is multiple global link URL filters? If so, warn a random one, of them</technical_language>

Target:
public DefaultQuickLinkVisibilityController(QuickLinksProfile profile) throws QuickLinksProfileEvaluationException { int filterCount = size(profile.getFilters()); globalRules = new FilterEvaluator(profile.getFilters()); for (Service service: profile.getServices()) { filterCount += size(service.getFilters()); serviceRules.put(service.getName(), new FilterEvaluator(service.getFilters())); for (Component component: service.getComponents()) { filterCount += size(component.getFilters()); componentRules.put(Pair.of(service.getName(), component.getName()), new FilterEvaluator(component.getFilters())); } } if (filterCount == 0) { throw new QuickLinksProfileEvaluationException("At least one filter must be defined."); } String globalOverrides = LinkNameFilter.getLinkNameFilters(profile.getFilters().stream()) .filter(f -> f.getLinkUrl() != null) .map(f -> f.getLinkName() + " -> " + f.getLinkUrl()) .collect(joining(", ")); if (!globalOverrides.isEmpty()) { LOG.warn("Link url overrides only work on service and component levels. The following global overrides will be " + "ignored: {}", globalOverrides); } for (Service service : profile.getServices()) { urlOverrides.putAll(getUrlOverrides(service.getName(), service.getFilters())); for (Component component : service.getComponents()) { Map<Pair<String, String>, String> componentUrlOverrides = getUrlOverrides(service.getName(), component.getFilters()); Set<Pair<String, String>> duplicateOverrides = Sets.intersection(urlOverrides.keySet(), componentUrlOverrides.keySet()); if (!duplicateOverrides.isEmpty()) { LOG.warn("Duplicate url overrides in quick links profile: {}", duplicateOverrides); } urlOverrides.putAll(componentUrlOverrides); } } }