summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
63e5382)
Transformation to IRSchemaSource ends up losing source symbolic name,
leading to anonymous sources. Make sure we propagate any source
symbolic name.
JIRA: YANGTOOLS-1275
Change-Id: I219d4bffa66c1262683db1b6af886a052c644cde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0e5d5323491caa4308d582bdb3d941c214146a22)
private final @Nullable String symbolicName;
public IRSchemaSource(final @NonNull SourceIdentifier identifier, final @NonNull IRStatement rootStatement,
private final @Nullable String symbolicName;
public IRSchemaSource(final @NonNull SourceIdentifier identifier, final @NonNull IRStatement rootStatement,
- @Nullable final String symbolicName) {
+ final @Nullable String symbolicName) {
super(identifier);
this.rootStatement = requireNonNull(rootStatement);
this.symbolicName = symbolicName;
super(identifier);
this.rootStatement = requireNonNull(rootStatement);
this.symbolicName = symbolicName;
checkArgument(rootStatement.argument() != null, "Root statement does not have an argument");
}
checkArgument(rootStatement.argument() != null, "Root statement does not have an argument");
}
+ @Deprecated(forRemoval = true)
public IRSchemaSource(final @NonNull SourceIdentifier identifier, final @NonNull IRStatement rootStatement) {
this(identifier, rootStatement, null);
}
public IRSchemaSource(final @NonNull SourceIdentifier identifier, final @NonNull IRStatement rootStatement) {
this(identifier, rootStatement, null);
}
final RevisionSourceIdentifier sourceId = latestRevision == null ? RevisionSourceIdentifier.create(name)
: RevisionSourceIdentifier.create(name, Revision.of(latestRevision));
final RevisionSourceIdentifier sourceId = latestRevision == null ? RevisionSourceIdentifier.create(name)
: RevisionSourceIdentifier.create(name, Revision.of(latestRevision));
- return new IRSchemaSource(sourceId, rootStatement);
+ return new IRSchemaSource(sourceId, rootStatement, text.getSymbolicName().orElse(null));