[YANGTOOLS-1232] Rework AbstractCodecFactory.codecFor() Created: 11/Feb/21  Updated: 16/Feb/21  Resolved: 16/Feb/21

Status: Resolved
Project: yangtools
Component/s: data-util
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by YANGTOOLS-1237 Add yang.model.api.EffectiveStatement... Resolved
is blocked by YANGTOOLS-1233 Maintain a SchemaInferenceStack in Sc... Resolved
Epic Link: Get rid of SchemaNode.getPath()

 Description   

AbstractCodecFactory performs leafref resolution based on an 'S extends TypeAware & SchemaNode' – leading to a call to SchemaContextUtil.getBaseTypeForLeafRef().

YANGTOOLS-1229 deals with properly moving that method to SchemaInferenceStack, effectively resulting in codecFor() requiring it.
Since SchemaInferenceStack is a mutable structure, we do not want to deal with its lifecycle, but rather have callers of codecFor() provide a resolution callback – and they will provide an appropriate SchemaInferenceStack-based implementation.

 


Generated at Wed Feb 07 20:55:33 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.