Add warning comment about subtlety around delayed value parsers.

This commit is contained in:
Kris De Volder
2017-08-02 15:36:30 -07:00
parent a4a8693aa4
commit ff52412161

View File

@@ -196,6 +196,7 @@ public class SchemaBasedYamlASTReconciler implements YamlASTReconciler {
if (typeUtil.isAtomic(type)) {
SchemaContextAware<ValueParser> parserProvider = typeUtil.getValueParser(type);
if (parserProvider!=null) {
//Take care not to execute parserProvider early just to check how long it should be delayed.
delayedConstraints.add(() -> {
parserProvider.safeWithContext(schemaContext).ifPresent(parser -> {
if (parser.longRunning()) {