Do not tolerate duplicate identities 81/87081/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Jan 2020 13:25:15 +0000 (14:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Jan 2020 14:20:28 +0000 (15:20 +0100)
commit6a19fb21d33759d00b85960980076d65945f34da
tree8c5c050884a8213d83a81578307eae80f9667ca0
parent0f87280449c48211db0da4d500631022cf8cb6ab
Do not tolerate duplicate identities

We have a unit test asserting identity definition squashing -- which
really is papering over the parser accepting the identities.

As per RFC7950, identity declarations must be unique, and we should
report them through normal SourceException.

JIRA: YANGTOOLS-1075
Change-Id: I98ce8615bcdb502cb79caa23fc9c3a127f850ea9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/identity/AbstractIdentityStatementSupport.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/IdentityStmtTest.java