public Schema getSchema()

in curator-framework/src/main/java/org/apache/curator/framework/schema/SchemaSet.java [148:170]


    public Schema getSchema(String path) {
        if (schemas.size() > 0) {
            Schema schema = pathToSchemas.get(path);
            if (schema == null) {
                try {
                    schema = regexCache.get(path);
                    if (schema.equals(nullSchema)) {
                        schema = useDefaultSchema ? defaultSchema : null;
                    }
                } catch (ExecutionException e) {
                    throw new RuntimeException(e);
                }
            }
            if (schema != null) {
                return schema;
            }
        }
        if (useDefaultSchema) {
            return defaultSchema;
        }
        throw new SchemaViolation(
                null, new SchemaViolation.ViolatorData(path, null, null), "No schema found for: " + path);
    }