Fix noRev map efficiency 46/79046/3
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:52:10 +0000 (23:52 +0000)
commit7afc50ff5a4485c4409045165385464ea246f4bc
treee40c622cca0b5be4a4e008bc4360822c7d237b64
parenta298f385bbb5a1ca9aeca03516bfac81c22bb1fd
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