private Map<String, Schema> traverseIncludedSchemaTypes(String schemaText, Map<String, SchemaParsingState> schemaParsingStates) throws InvalidSchemaException, SchemaNotFoundException { List<SchemaVersionKey> includedSchemaVersions = getIncludedSchemaVersions(schemaText); if (includedSchemaVersions == null || includedSchemaVersions.isEmpty()) { return Collections.emptyMap(); } Map<String, Schema> schemaTypes = new HashMap<>(); for (SchemaVersionKey schemaVersionKey : includedSchemaVersions) { Map<String, Schema> collectedSchemas = collectSchemaTypes(schemaVersionKey, schemaParsingStates); if (collectedSchemas != null) { schemaTypes.putAll(collectedSchemas); } } return schemaTypes; }
private Map<String, Schema> traverseIncludedSchemaTypes(String schemaText, Map<String, SchemaParsingState> schemaParsingStates) throws InvalidSchemaException, SchemaNotFoundException { List<SchemaVersionKey> includedSchemaVersions = getIncludedSchemaVersions(schemaText); if (includedSchemaVersions == null || includedSchemaVersions.isEmpty()) { return Collections.emptyMap(); } Map<String, Schema> schemaTypes = new HashMap<>(); for (SchemaVersionKey schemaVersionKey : includedSchemaVersions) { Map<String, Schema> collectedSchemas = collectSchemaTypes(schemaVersionKey, schemaParsingStates); if (collectedSchemas != null) { schemaTypes.putAll(collectedSchemas); } } return schemaTypes; }