Refactor InstanceIdentifier.create(Iterable) 92/100092/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 12 Mar 2022 12:41:25 +0000 (13:41 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 12 Mar 2022 12:45:49 +0000 (13:45 +0100)
commit5665bba160d3c8e731a2d2b010a7d725c2ce55af
treef505836b4460aa4280bbcc6e9fec40a3a0dd823c
parentf735dcbc86962f6b51abecadec0c00f595649984
Refactor InstanceIdentifier.create(Iterable)

This method is for things like binding/dom codec and similar users who
know what they are doing. Rename the method to 'unsafeOf()', so that the
compilation failures from the change in InstanceIdentifier.create(Class)'s
signature do not produce confusing guidance by pointing to this arcane
method.

Also document this method's purpose, with significant warning and update
it to take a List.

JIRA: MDSAL-730
Change-Id: I9def3750f16d87c11d12809e0f067daf0bf352b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/BindingCodecContext.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/InstanceIdentifierCodec.java
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java
binding/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifierTest.java