Fix noRev map efficiency 46/79046/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 25 Dec 2018 23:07:24 +0000 (00:07 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 25 Dec 2018 23:28:18 +0000 (23:28 +0000)
commite4aa6ef84602dfe47720fa6ebba8fff53bb6886f
tree5f9f27947af8feeef619b8e3d5c2bdebfec9fcd4
parent35d320dc681b4d38c4afdaca1f8af0ef2d944094
Fix noRev map efficiency

QName.getRevision() always returns non-null, which means we are
always taking the slow version of this branch, as correctly flagged
by Eclipse.

Furthermore we can use QName.withoutRevision() to side-step QName's
localName validation, as the local name is known to have already
been checked.

Change-Id: I7be3b8053ab3dbddfdf9cf12f8754a307127a8b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QName.java
yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/QNameToStatementDefinitionMap.java