Unprefixed statements are most common and we end up creating
a QNameModule each time we encounter them, while we have a common
constant which we can use.
Use the constant, allowing us to allocate fewer objects while
also allowing making interning work.
Change-Id: I9e8847f8bd39fb9bcf6f8d0e8b86d196aeb5e2cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
QName getValidStatementDefinition(final String keywordText, final StatementSourceReference ref) {
final int firstColon = keywordText.indexOf(':');
if (firstColon == -1) {
- final StatementDefinition def = stmtDef.get(QName.create(YangConstants.RFC6020_YIN_NAMESPACE, keywordText));
+ final StatementDefinition def = stmtDef.get(QName.create(YangConstants.RFC6020_YIN_MODULE, keywordText));
return def != null ? def.getStatementName() : null;
}