Cleanup leafref path parsing 95/75795/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Sep 2018 17:39:45 +0000 (19:39 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 6 Sep 2018 07:29:48 +0000 (07:29 +0000)
commitdaa0958e124cbc8391fcde6cccd836ce835d538f
tree7c20ed4738596061c0acd2c59252f184dbf38ac3
parent224f1af8a965a8653f80d630a2c93792d3242899
Cleanup leafref path parsing

We have a String on input and LeafRefPathParserImpl uses ANTLR's
CharStreams -- hence it makes no sense to bounce input through
an InputStream.

Remove this atrocity, eliminating an IOException/IllegalStateException
error path in process.

JIRA: YANGTOOLS-892
Change-Id: I78eadf30da6a1e64621ca4c14dfa13e84524b591
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 23b7ff7e2e39e0d520e249ae5b256746acef5abd)
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefContext.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefContextTreeBuilder.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefPathParserImpl.java