private static void validateFieldAliasTargets(List<FieldAliasMapper> fieldAliasMappers, Map<String, ObjectMapper> fullPathObjectMappers) { for (FieldAliasMapper mapper : fieldAliasMappers) { String aliasName = mapper.name(); String path = mapper.path(); String aliasScope = getNestedScope(aliasName, fullPathObjectMappers); String pathScope = getNestedScope(path, fullPathObjectMappers); if (!Objects.equals(aliasScope, pathScope)) { StringBuilder message = new StringBuilder("Invalid [path] value [" + path + "] for field alias [" + aliasName + "]: an alias must have the same nested scope as its target. "); message.append(aliasScope == null ? "The alias is not nested" : "The alias's nested scope is [" + aliasScope + "]"); message.append(", but "); message.append(pathScope == null ? "the target is not nested." : "the target's nested scope is [" + pathScope + "]."); throw new IllegalArgumentException(message.toString()); } } }
String path = fieldAliasMapper.path();
private static void validateFieldAliasTargets(List<FieldAliasMapper> fieldAliasMappers, Map<String, ObjectMapper> fullPathObjectMappers) { for (FieldAliasMapper mapper : fieldAliasMappers) { String aliasName = mapper.name(); String path = mapper.path(); String aliasScope = getNestedScope(aliasName, fullPathObjectMappers); String pathScope = getNestedScope(path, fullPathObjectMappers); if (!Objects.equals(aliasScope, pathScope)) { StringBuilder message = new StringBuilder("Invalid [path] value [" + path + "] for field alias [" + aliasName + "]: an alias must have the same nested scope as its target. "); message.append(aliasScope == null ? "The alias is not nested" : "The alias's nested scope is [" + aliasScope + "]"); message.append(", but "); message.append(pathScope == null ? "the target is not nested." : "the target's nested scope is [" + pathScope + "]."); throw new IllegalArgumentException(message.toString()); } } }
private static void validateFieldAliasTargets(List<FieldAliasMapper> fieldAliasMappers, Map<String, ObjectMapper> fullPathObjectMappers) { for (FieldAliasMapper mapper : fieldAliasMappers) { String aliasName = mapper.name(); String path = mapper.path(); String aliasScope = getNestedScope(aliasName, fullPathObjectMappers); String pathScope = getNestedScope(path, fullPathObjectMappers); if (!Objects.equals(aliasScope, pathScope)) { StringBuilder message = new StringBuilder("Invalid [path] value [" + path + "] for field alias [" + aliasName + "]: an alias must have the same nested scope as its target. "); message.append(aliasScope == null ? "The alias is not nested" : "The alias's nested scope is [" + aliasScope + "]"); message.append(", but "); message.append(pathScope == null ? "the target is not nested." : "the target's nested scope is [" + pathScope + "]."); throw new IllegalArgumentException(message.toString()); } } }
String path = fieldAliasMapper.path();
String path = fieldAliasMapper.path();