/** * Gets all properties that start with either of the given prefixes. The {@code fullPreferredPrefix} * properties will override any duplicates in {@code fullDeprecatedPrefix}. If there are any * properties that match the {@code fullDeprecatedPrefix}, then a warning will be logged. * * @see #getMatchingProperties(String, Map) */ protected Map<String, Object> getMatchingProperties(String fullPreferredPrefix, String fullDeprecatedPrefix, Map<String, ?> properties) { Map<String, Object> deprecatedResults = getMatchingProperties(fullDeprecatedPrefix, properties); Map<String, Object> results = getMatchingProperties(fullPreferredPrefix, properties); if (deprecatedResults.size() > 0) { LOG.warn("Deprecated use of properties prefix "+fullDeprecatedPrefix+"; instead use "+fullPreferredPrefix); return MutableMap.<String, Object>builder() .putAll(deprecatedResults) .putAll(results) .build(); } else { return results; } }