yangtools.git
4 months agoRemove unused suppression 41/109441/1
Robert Varga [Thu, 28 Dec 2023 11:44:38 +0000 (12:44 +0100)]
Remove unused suppression

Since NormalizedNode.Builder is not generic, we no longer need this
suppression.

JIRA: YANGTOOLS-1259
Change-Id: Ia253daa1ea4c29db12f93ad5a2247db4352b2f07
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRedirect Builders through ImmutableNodes' builder factory 10/109410/6
Robert Varga [Sat, 23 Dec 2023 01:09:21 +0000 (02:09 +0100)]
Redirect Builders through ImmutableNodes' builder factory

Now that we have an intermediate interface for creating builders, we
want to funnel all calls through it.

This disconnects Builders from the actual implementations.

JIRA: YANGTOOLS-1259
Change-Id: Ibc7dc9dc6de9872c1f95e25a3efd2dae50e73d08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoBump odlparent to 13.0.10 90/109390/2
Robert Varga [Mon, 18 Dec 2023 15:01:13 +0000 (16:01 +0100)]
Bump odlparent to 13.0.10

Pick up latest upgrades.

Change-Id: I3748f701c67f6b750ab0eb08d0005b1138d63ef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote MandatorLeafEnforcer 11/109411/3
Robert Varga [Sat, 23 Dec 2023 02:40:05 +0000 (03:40 +0100)]
Promote MandatorLeafEnforcer

This is a very useful utility, promote it to data.spi.node, so it is
easily accessible.

JIRA: YANGTOOLS-980
Change-Id: I90c1320b5e3aa8fda19c50e3aeefde493da01341
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd NormalizedNode.BuilderFactory 05/109405/11
Robert Varga [Fri, 22 Dec 2023 01:18:51 +0000 (02:18 +0100)]
Add NormalizedNode.BuilderFactory

Add a centralized interface for creating all know builder types. This
allows us to decouple most call sides from Builders/ImmutableNodes,
directly tying into a provider.

This decoupling can be used to further promote constructs, as their
dependency on ImmutableNodes/Builders can be indirected through this
factory.

JIRA: YANGTOOLS-1259
Change-Id: Ic68d84501b1d0e8ad3110ae8f1ece63c25c59ec1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote InterningLeafSetNodeBuilder 08/109408/1
Robert Varga [Fri, 22 Dec 2023 23:34:06 +0000 (00:34 +0100)]
Promote InterningLeafSetNodeBuilder

This is a useful utility, promote it to data.spi.node, integrating
LeafsetEntryInterner.

JIRA: YANGTOOLS-980
Change-Id: Idd49b9e85fc96d9fb9d80541ce720efb92466225
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote InterningLeafNodeBuilder 07/109407/1
Robert Varga [Fri, 22 Dec 2023 22:50:47 +0000 (23:50 +0100)]
Promote InterningLeafNodeBuilder

This is a useful utility, promote it to data.spi.node.

JIRA: YANGTOOLS-980
Change-Id: Id96fc4281fb39e821c8ab1e0a1132f615215a66a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoIntroduce NormalizedNode.Builder interfaces 99/109399/7
Robert Varga [Thu, 21 Dec 2023 11:58:11 +0000 (12:58 +0100)]
Introduce NormalizedNode.Builder interfaces

Each valid end-user specialization get a Builder interface, which is
then implemented by a immutable builder.

The hierarchy starts at NormalizedNode.Builder and crosses to the legacy
NormalizedNodeBuilder, ending with, for example, ContainerNode.Builder.

This builder hierarchy allows is to improve Builders API accuracy -- and
that accuracy in turn allows us to disconnect
InterningLeaf(Set)NodeBuilder from the immutable hierarchy, becoming
just forwarding implementations of Leaf(Set)Node.Builder.

JIRA: YANGTOOLS-1259
Change-Id: I8dd84914e7aef66619f6a8dfde9aa76b8aec6538
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove NormalizedNode.getIdentifier() 04/109404/2
Robert Varga [Thu, 21 Dec 2023 22:13:03 +0000 (23:13 +0100)]
Remove NormalizedNode.getIdentifier()

This method has been deprecated for removal, remove it now.

JIRA: YANGTOOLS-1559
Change-Id: Ia8f839c0daa60fc64ce20084833f3516869b02a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DefaultYangParser 98/109398/1
Robert Varga [Thu, 21 Dec 2023 10:54:44 +0000 (11:54 +0100)]
Clean up DefaultYangParser

- remove superfluous @NonNull
- use ImmutableSet for REPRESENTATIONS
- use instanceof patterns

Change-Id: Ifd7a0da2446d2ae7d826cff92079b3ab426c24ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote DefaultYangLibResolver 97/109397/1
Robert Varga [Thu, 21 Dec 2023 10:41:31 +0000 (11:41 +0100)]
Promote DefaultYangLibResolver

This is not a @Beta. Also clean up OSGi activation to be lazy.

Change-Id: If3b7ff8f28556d5d156193b1556b151b29fc26eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd YANG IR I/O support 60/92260/24
Robert Varga [Mon, 24 Aug 2020 16:36:00 +0000 (18:36 +0200)]
Add YANG IR I/O support

Persisting the intermediate representation and restoring it is much
faster and memory-efficient than parsing YANG files from scratch.

This patch adds the smarts to persist/restore an IRStatement to/from
an arbitrary DataOutput/DataInput.

We also complete AbstractIRObject definitions by adding appropriate
hashCode()/equals() methods.

JIRA: YANGTOOLS-1461
Change-Id: Iff10b91c8439d3323ae8c263480f4dfd6c1f1c00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd InputStreamNormalizer 93/109293/13
Robert Varga [Mon, 11 Dec 2023 22:49:54 +0000 (23:49 +0100)]
Add InputStreamNormalizer

This patch adds InputStreamNormalizer interface to act as a unified API
displacing direct use of XmlParserStream/JsonParserStream.

It is modelled after the needs of RFC8040, yet it is useful in general,
as it supports essentially all use cases serviced by the *ParserStreams.

This core implementation logic is in
data.util.AbstractInputStreamNormalizer, which is a subclass of
AbstractCodecFactory.

The JSON-specific part is introduced as well, with the correspondign
NormalizedNodeParserTest.

JIRA: YANGTOOLS-1415
Change-Id: Id95b609257e1a8ab57e3d61896315e3211223176
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoMake NormalizedTuple generic 23/109323/1
Robert Varga [Fri, 15 Dec 2023 01:06:48 +0000 (02:06 +0100)]
Make NormalizedTuple generic

NormalizedTuple should capture the type of NormalizedNode it carries.
This will be useful as we define more normalization APIs, where some
parts guarantee, for example, ContainerNode.

Change-Id: I01a3429c0bb38cd87d293dfbd154be7aa69c411d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoModernize JsonParserStream 16/109316/1
Robert Varga [Thu, 14 Dec 2023 21:28:11 +0000 (22:28 +0100)]
Modernize JsonParserStream

Use local variable type inference, instanceof patterns and explicit
throws to modernize the codebase a bit.

Change-Id: Ib4b5d28b38da2d1797710d4e05ac5d2d792da157
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoBump odlparent to 13.0.9 88/109188/5
Robert Varga [Wed, 6 Dec 2023 22:11:26 +0000 (23:11 +0100)]
Bump odlparent to 13.0.9

Adopt latest fixes and deal with stricter SpotBugs -- mostly by adding
suppressions of false positives.

Change-Id: I992e1ae8b5c0c6926c049230b25acbf1ae7b0272
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDo not import java.io.Serial 85/109285/2
Robert Varga [Mon, 11 Dec 2023 13:05:36 +0000 (14:05 +0100)]
Do not import java.io.Serial

This annotation is not worth an import, just use fully-qualified
references.

Change-Id: I393c5e13ef89f3ca740f010018288309dad96838
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoFix warnings around Version nullness 78/109278/1
Robert Varga [Mon, 11 Dec 2023 06:38:12 +0000 (07:38 +0100)]
Fix warnings around Version nullness

Version factory methods always return non-null, annotate that.

Change-Id: I388b161c10437fa812f9a30b99ac484e0175f483
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRemove YangTextSchemaSourceRegistration 29/109229/1
Robert Varga [Fri, 8 Dec 2023 16:56:00 +0000 (17:56 +0100)]
Remove YangTextSchemaSourceRegistration

This interface brings very little to the table, just use a plain
Registration.

JIRA: YANGTOOLS-1551
Change-Id: I69f3fe915c8d35e479ae8fa75313b532ea3b120c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDeprecate ListenerRegistration for removal 27/109227/1
Robert Varga [Fri, 8 Dec 2023 16:37:15 +0000 (17:37 +0100)]
Deprecate ListenerRegistration for removal

This interface brings very little to the table and binds to
j.u.EventListener as if it were a good idea. Deprecate it for removal,
guiding users towards ObjectRegistration instead.

JIRA: YANGTOOLS-1551
Change-Id: Id621532b52bb7d9d4cea335d6841bf110a68af62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDeprecate ListenerRegistry for removal 26/109226/2
Robert Varga [Fri, 8 Dec 2023 13:43:52 +0000 (14:43 +0100)]
Deprecate ListenerRegistry for removal

ListenerRegistry is intrinsically tied to EventListener. We have
ObjectRegistry which has the same functionality without the excess
baggage.

Add ObjectRegistryTest and deprecate ListenerRegistry for removal.

JIRA: YANGTOOLS-1551
Change-Id: I10bc98420abe5f760e08f4a05ef189df85cc7ee0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRemove SchemaSourceRegistration 25/109225/3
Robert Varga [Fri, 8 Dec 2023 13:34:15 +0000 (14:34 +0100)]
Remove SchemaSourceRegistration

Previous patch has touched yang.model.repo.spi. Since we are in the
area, also remove SchemaSourceRegistration to keep the API consistent.

JIRA: YANGTOOLS-1551
Change-Id: Iba1ea385c8f72433410c283a523207d2d3d77dfb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDisconnect StatementContextBase from EventListener 19/109219/4
Robert Varga [Thu, 7 Dec 2023 22:23:30 +0000 (23:23 +0100)]
Disconnect StatementContextBase from EventListener

j.u.EventListener should really be tied to j.u.EventObject, which is not
useful for our purposes. Ditch the reference in StatementContextBase.

JIRA: YANGTOOLS-1551
Change-Id: I3f364e1f41f757d087bb75464f08ab4f8e64474a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDisconnect SchemaSourceListener from EventListener 18/109218/5
Robert Varga [Thu, 7 Dec 2023 22:19:53 +0000 (23:19 +0100)]
Disconnect SchemaSourceListener from EventListener

j.u.EventListener should really be tied to j.u.EventObject, which is not
useful for our purposes. Ditch the reference in SchemaSourceListener.

This ends up forcing us to abandon AbstractSchemaListenerRegistration,
which is fine, as we can just pull the functionality into an internal
class.

JIRA: YANGTOOLS-1551
Change-Id: Id439e9bac61a4ba991ed75d04c19ead7d94a72c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRemove SchemaContextListener 17/109217/1
Robert Varga [Thu, 7 Dec 2023 22:14:26 +0000 (23:14 +0100)]
Remove SchemaContextListener

This is a holdout of times long past and it references j.u.EventLister.
Remove it.

JIRA: YANGTOOLS-1551
Change-Id: I7855fb188168774f5ee4b45ef5670942fef59c05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDisconnect EffectiveModelContextListener from EventListener 15/109215/1
Robert Varga [Thu, 7 Dec 2023 21:56:13 +0000 (22:56 +0100)]
Disconnect EffectiveModelContextListener from EventListener

j.u.EventListener should really be tied to j.u.EventObject, which is not
useful for our purposes. Ditch the reference in
EffectiveModelContextListener.

JIRA: YANGTOOLS-1551
Change-Id: Ifa2078bf2d0a689ded83a57432985a9087a3664b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoDeprecate SchemaContextListener for removal 14/109214/1
Robert Varga [Thu, 7 Dec 2023 21:55:17 +0000 (22:55 +0100)]
Deprecate SchemaContextListener for removal

SchemaContext is superseded by EffectiveModelContext, guide users
towards that by deprecating SchemaContextListeer.

JIRA: YANGTOOLS-1553
Change-Id: I91a821bc5651cdf2167820f549427200c9162c07
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoFix Eclipse nullness errors 81/109181/2
Robert Varga [Wed, 6 Dec 2023 21:07:59 +0000 (22:07 +0100)]
Fix Eclipse nullness errors

We have two error-level warnings reported for instantiated GeneratorTask
list. Fix them by annotating the result of instantiateGenerators().

While we are here, also clean up the method a bit and return an
ImmutableList instead.

Change-Id: Ic373c34671877c1cf5ce685ed38e55ef3579fc34
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd Inference.of() 29/109129/1
Robert Varga [Thu, 30 Nov 2023 19:15:53 +0000 (20:15 +0100)]
Add Inference.of()

Improve documentation and a shortcut method to create an empty
Inference.

Change-Id: I431042cb04fd7812733a8f9b72480d3761695aa5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoImprove ListEntryNodeDataWithSchema error reporting 16/109116/3
Robert Varga [Tue, 28 Nov 2023 23:49:13 +0000 (00:49 +0100)]
Improve ListEntryNodeDataWithSchema error reporting

When we encounter a keyed list entry which does not have all keys
specified we should report which keys are missing through an
IOException.

JIRA: YANGTOOLS-1550
Change-Id: I40a7c04970b244c893f4541469efe7e562b49e71
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoImprove OffsetMapTemplate error reporting 15/109115/3
Robert Varga [Tue, 28 Nov 2023 22:36:32 +0000 (23:36 +0100)]
Improve OffsetMapTemplate error reporting

Include a human-readable message when we throw an IAE.

JIRA: YANGTOOLS-1550
Change-Id: I7acb3e9b23ed20a00551435ce68c68d138a052e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd AbstractHierarchicalIdentifier 50/109050/3
Robert Varga [Wed, 22 Nov 2023 15:00:22 +0000 (16:00 +0100)]
Add AbstractHierarchicalIdentifier

We have a few implementations of Hierarc hicalIdentifier, some of which
are composed of a series of steps and nothing more.

Introduce AbstractHierarchicalIdentifier to serve as the common
superclass, formalizing the common bits.

JIRA: YANGTOOLS-1549
Change-Id: I958b2092ba4da3d8f6ca358b46b66ccc96d3b1ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoUse local variable type inference for stack 49/109049/1
Robert Varga [Wed, 22 Nov 2023 14:58:06 +0000 (15:58 +0100)]
Use local variable type inference for stack

This is a trivial simplification of code.

Change-Id: I0e5a7d5a7a74feff888cb5c00bcfb954fb8ff90b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoDeprecate JSONCodecFactory.Lhotka02 for removal 24/108924/2
Robert Varga [Tue, 14 Nov 2023 08:47:22 +0000 (09:47 +0100)]
Deprecate JSONCodecFactory.Lhotka02 for removal

We have deprecated the provider in the previous release, indicate our
intent to remove it.

Change-Id: I6e6a65d97f5ca14367dcee2fc16a9822690342a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoUpdate XmlToNormalizedNodesTest 40/108740/1
Robert Varga [Mon, 30 Oct 2023 09:32:50 +0000 (10:32 +0100)]
Update XmlToNormalizedNodesTest

Spell out the two YANG files used in the test.

Change-Id: Ic7fa9d591afd5985adc647dad2656a5ce2a4d9df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8ffdededfd03af7351389e8b1b355a7c7b62fe09)

6 months agoBump odlparent to 13.0.7 24/108724/1
Robert Varga [Sun, 29 Oct 2023 19:26:04 +0000 (20:26 +0100)]
Bump odlparent to 13.0.7

Adopt latest upgrades from upstream.

Change-Id: I6048f91776d198fb17ab285df8802bf6bbafc17b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoModernize SchemaInferenceStack 89/108689/4
Robert Varga [Thu, 26 Oct 2023 19:30:37 +0000 (21:30 +0200)]
Modernize SchemaInferenceStack

Use local variable type inference and instanceof patterns to reduce the
number of explicit type declarations and casts.

Also (mostly) migrate away from verify()/checkState()/checkArgument(),
exposing further branches that should be tested and a potentially-dead
code.

Change-Id: I656bdc230393f736f57b80f8256fd726079edf9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoAdd SchemaInferenceStack.effectiveStatus() 32/104132/5
Robert Varga [Wed, 25 Jan 2023 04:32:22 +0000 (05:32 +0100)]
Add SchemaInferenceStack.effectiveStatus()

EffectiveStatements are lacking the equivalent of
DocumentedNode.WithStatus.getStatus().

This patch introduces a utility method in SchemaInferenceStack, which
acts as a replacement producing results well-defined in
EffectiveStatement world.

JIRA: YANGTOOLS-1272
Change-Id: I1b07d4ab2eb43c62090d526326ac10df901e8bfb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoAdopt odlparent-13.0.6 69/108569/1
Robert Varga [Fri, 20 Oct 2023 16:09:59 +0000 (18:09 +0200)]
Adopt odlparent-13.0.6

Pick up latest fixes and updates from upstream.

Change-Id: I20d9dc57e0a3e7bbcc72f56af7b93924b7d94577
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoConvert yang-data-codec-xml to JUnit5 84/106884/2
Robert Varga [Wed, 18 Oct 2023 15:26:18 +0000 (17:26 +0200)]
Convert yang-data-codec-xml to JUnit5

This is a mostly automated conversion, but the parameterized tests
require some intervention.

JIRA: YANGTOOLS-1521
Change-Id: I8599cc0dc3b98a8206e09312fea828826c58072a
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-data-codec-binfmt to JUnit 5 82/106882/3
Robert Varga [Wed, 18 Oct 2023 11:32:56 +0000 (13:32 +0200)]
Migrate yang-data-codec-binfmt to JUnit 5

We have a ton of parameterized tests here, migrate them manually to
JUnit5.

JIRA: YANGTOOLS-1521
Change-Id: I4efc867a01a4dbb6a6fc38e452ab4db55ff0819c
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-data-tree-ri to JUnit5 98/106898/5
matus.matok [Thu, 13 Jul 2023 07:46:33 +0000 (09:46 +0200)]
Migrate yang-data-tree-ri to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks.
Removed declarations of never thrown exceptions.
Manually refactored variable modifiers and used 'var' wherever possible

JIRA: YANGTOOLS-1521
Change-Id: I4870be9af36c1e8924323e671c02dbbab42b83a5
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoPartially Migrate yang-data-codec-xml to xmlunit-core 94/108494/1
Robert Varga [Wed, 18 Oct 2023 07:36:33 +0000 (09:36 +0200)]
Partially Migrate yang-data-codec-xml to xmlunit-core

Migrate easy-to-migrate tests to xmlunit-core, reducing our exposure to
legacy.

Change-Id: If07f69cb40179df00daabf68fc6faf34df8c2d08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-data-impl to JUnit5 97/106897/7
matus.matok [Thu, 13 Jul 2023 07:37:27 +0000 (09:37 +0200)]
Migrate yang-data-impl to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks. Manually corrected variable modifiers,
including migration to 'var'.

JIRA: YANGTOOLS-1521
Change-Id: Iecffb046c782ec732da51d9d92738d3bfebf5ef4
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove MemoryConsumption 93/108493/1
Robert Varga [Wed, 18 Oct 2023 07:05:44 +0000 (09:05 +0200)]
Remove MemoryConsumption

This class is not used anywhere, remove it.

Change-Id: I8fcaa8db98a5cd266d4c8c10d983b98c3327485b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoDo not create effective copy for unsupported statements 87/107387/5
Sangwook Ha [Thu, 10 Aug 2023 23:15:25 +0000 (16:15 -0700)]
Do not create effective copy for unsupported statements

If we are encountering a statement which is not supported, we should not
create an effective copy of it for the purposes of comparison.

JIRA: YANGTOOLS-1532
Change-Id: I4407e38f2a62c911b653191bf7c6cfd82ba0225e
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate rfc8639-parser-support to JUnit5 07/106907/7
matus.matok [Thu, 13 Jul 2023 08:38:19 +0000 (10:38 +0200)]
Migrate rfc8639-parser-support to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks.

JIRA: YANGTOOLS-1521
Change-Id: I5e3d60cca03a1b8af3b50b96ed2db542a8bb3258
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-repo-spi to JUnit5 12/106912/4
matus.matok [Thu, 13 Jul 2023 09:27:10 +0000 (11:27 +0200)]
Migrate yang-repo-spi to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks.

JIRA: YANGTOOLS-1521
Change-Id: I99202bffab5035110a3c2b3d9228d64d933c26c3
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-maven-plugin-it to JUnit5 11/106911/5
matus.matok [Thu, 13 Jul 2023 09:22:34 +0000 (11:22 +0200)]
Migrate yang-maven-plugin-it to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks.

JIRA: YANGTOOLS-1521
Change-Id: Idd39caf43f861daf71dbf743270c8a969f5547a9
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-parser-spi to JUnit5 09/106909/8
matus.matok [Thu, 13 Jul 2023 08:57:02 +0000 (10:57 +0200)]
Migrate yang-parser-spi to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks. Also clean up mocking and use
MockitoExtension.

JIRA: YANGTOOLS-1521
Change-Id: Icc91eda7a6e15003aa1a1135bd31a960869ded14
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate common/util to JUnit5 96/106896/7
matus.matok [Thu, 13 Jul 2023 07:30:33 +0000 (09:30 +0200)]
Migrate common/util to JUnit5

Migrated all tests to use JUnit5 Assertions, using
openrewrite:rewrite-testing-frameworks.

JIRA: YANGTOOLS-1521
Change-Id: I175e6fb628a1f1375e70ff8c93f1b1028ccf4ce6
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-data-codec-gson to JUnit5 83/106883/5
matus.matok [Tue, 11 Jul 2023 13:46:45 +0000 (15:46 +0200)]
Migrate yang-data-codec-gson to JUnit5

Migrated all tests to use JUnit5 Assertions, using rewrite-testing-frameworks.

JIRA: YANGTOOLS-1521
Change-Id: I0f8b99033ca895da190324c5458da12d2de9bb07
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-data-tree-spi to JUnit5 99/106899/5
matus.matok [Thu, 13 Jul 2023 07:58:41 +0000 (09:58 +0200)]
Migrate yang-data-tree-spi to JUnit5

Migrated all tests to use JUnit5 Assertions, using openrewrite:rewrite-testing-frameworks.

JIRA: YANGTOOLS-1521
Change-Id: I7670aa3b290b21e5e7c47a70316550fbfa4164d6
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
7 months agoRemove support for inputs older than Magnesium 57/108257/2
Robert Varga [Thu, 5 Oct 2023 15:17:29 +0000 (17:17 +0200)]
Remove support for inputs older than Magnesium

We have a number of obsolete formats here, which are not efficient or
tested. Eliminate LITHIUM,NEON_SR2 and SODIUM_SR1 support.

JIRA: YANGTOOLS-1548
Change-Id: I973916d2ffb25e219380c854dcbe2d86d0b60337
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoCheck rc:yang-data template name duplications 59/108259/3
Robert Varga [Thu, 5 Oct 2023 16:54:16 +0000 (18:54 +0200)]
Check rc:yang-data template name duplications

yang-data template names have a global scope, similar to schema tree
namespace. Enforce non-overlap of template names in a particular
reactor.

JIRA: YANGTOOLS-1482
Change-Id: I2da9188d5a95baa591b8ceef585a3e84fa18f531
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove EffectiveAugmentationSchema 56/108256/2
Robert Varga [Thu, 5 Oct 2023 15:04:54 +0000 (17:04 +0200)]
Remove EffectiveAugmentationSchema

This class is not needed anywhere and has been deprecated for removal.
Remove it in this major iteration.

Change-Id: Ibad4f6e66b559285e5fda61281e421c12da23838
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoDrop QNameModuleAware from AugmentEffectiveStatementImpl 18/107918/3
Robert Varga [Tue, 19 Sep 2023 16:41:06 +0000 (18:41 +0200)]
Drop QNameModuleAware from AugmentEffectiveStatementImpl

This interface is not specified and hence should not be used.

JIRA: YANGTOOLS-1409
Change-Id: I5d3d6dc34d85d360e92c05f083f10b475c732b0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoReduce use of yang.model.api 53/106953/5
Robert Varga [Fri, 21 Jul 2023 09:07:29 +0000 (11:07 +0200)]
Reduce use of yang.model.api

AbstractModuleStringInstanceIdentifierCodec really needs only
QNameModule, update its contract to not rely on yang.model.api.Module.

JIRA: YANGTOOLS-1524
Change-Id: I2648be150328a945a3f53c85820d91c9a112674e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove EvenMoreObjects 55/108255/1
Robert Varga [Thu, 5 Oct 2023 15:02:40 +0000 (17:02 +0200)]
Remove EvenMoreObjects

This class is completely unused and deprecated for removal. Remove it as
part of this major version bump.

Change-Id: Ic1daa590d19595d78f07884c5f5af4d2b992e82e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove getValue() methods from model.api.stmt interfaces 54/108254/1
Robert Varga [Thu, 5 Oct 2023 15:01:08 +0000 (17:01 +0200)]
Remove getValue() methods from model.api.stmt interfaces

These methods have been deprecated for removal, remove them as part of
the next major release.

Change-Id: Id982b9a9135eca421c991d3943f3fdfe93f3ed0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove obsolete DataTreeCandidateNode methods 25/106225/4
Robert Varga [Mon, 29 May 2023 08:46:28 +0000 (10:46 +0200)]
Remove obsolete DataTreeCandidateNode methods

These methods have been deprecated for removal, remove them now.

Change-Id: I7e27d15fa2ab9a239fd2d4c9de0f81251a11eac0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoDo not trim XML element text 45/106945/8
Robert Varga [Thu, 20 Jul 2023 23:51:30 +0000 (01:51 +0200)]
Do not trim XML element text

Historically we have been trimming the content of XML elements, which
means we accepted leading/trailing whitespace for uint8 and similar
encodings.

This is not correct and this patch eliminates all trimming.

JIRA: YANGTOOLS-1523
Change-Id: I7060f8f2bf3374b4ca49629b6c4cdddb85660567
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove AbstractStringIdentityrefCodec and its subclasses 35/108035/4
Robert Varga [Thu, 5 Oct 2023 13:03:43 +0000 (15:03 +0200)]
Remove AbstractStringIdentityrefCodec and its subclasses

These classes are not used anywhere, remove them.

Change-Id: I56f257874c422ac33e0f37608e694c90fb7f4729
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoImprove AbstractNamespaceCodec 34/108034/3
Robert Varga [Thu, 28 Sep 2023 21:46:00 +0000 (23:46 +0200)]
Improve AbstractNamespaceCodec

Improve nullness guarantees in createQName().

Change-Id: Icdb58b2ede7a5e2b8f380614719f3a1842255e53
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoPromote AbstractStringInstanceIdentifierCodec 33/108033/2
Robert Varga [Thu, 28 Sep 2023 21:40:57 +0000 (23:40 +0200)]
Promote AbstractStringInstanceIdentifierCodec

Integrate AbstractModuleStringInstanceIdentifierCodec, which is the only
subclass in active use. Drop @Beta moniker.

Change-Id: I5fe285feefd7db75fa73d8903f9d866390f9365f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoForce subclasses to implement deserializeKeyValue() 32/108032/4
Robert Varga [Thu, 28 Sep 2023 20:50:38 +0000 (22:50 +0200)]
Force subclasses to implement deserializeKeyValue()

Just passing values through is not appropriate -- everyone needs to
explicitly deal with values.

Change-Id: If019d9f1194dae0faa624d2ec08e09b043a4183d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoSwitch to using ModuleEffectiveStatement in codecs 31/108031/4
Robert Varga [Thu, 28 Sep 2023 20:48:27 +0000 (22:48 +0200)]
Switch to using ModuleEffectiveStatement in codecs

Rather than using Module, use ModuleEffectiveStatement, which provides
very similar facilities.

Change-Id: I3961e6dc17c236b71ebf555519ea06d3cbdc218b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoBump versions to 12.0.0-SNAPSHOT 50/108250/2
Robert Varga [Thu, 5 Oct 2023 12:49:37 +0000 (14:49 +0200)]
Bump versions to 12.0.0-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie1a2c561e3fcc17a487cdb89e9bbbed83fca03d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoDo not use Optional in returns 04/107704/11
Robert Varga [Tue, 5 Sep 2023 00:59:37 +0000 (02:59 +0200)]
Do not use Optional in returns

Optionals are providing type-safety, but we can achieve the same thing
with @Nullable TreeNode. Update call convention to reflect that.

JIRA: YANGTOOLS-1538
Change-Id: I67cbf46d2683c454f5aaece40041bef02d5dab0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRefactor ModificationApplyOperation 93/107693/18
Robert Varga [Mon, 4 Sep 2023 18:50:25 +0000 (20:50 +0200)]
Refactor ModificationApplyOperation

Use currentMeta as a @Nullable TreeNode, replacing checks as
appropriate.

JIRA: YANGTOOLS-1538
Change-Id: I7dfeea43515fe0dd3099ed2dd48086fd8f297ea8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoDo not store Optional in ModifiedNode 92/107692/8
Robert Varga [Mon, 4 Sep 2023 18:15:35 +0000 (20:15 +0200)]
Do not store Optional in ModifiedNode

Storing an Optional is a bit superfluous and an anti-pattern. Use a
@Nullable type instead. Also migrate users which can easily use a
nullable instead of Optional.

JIRA: YANGTOOLS-1538
Change-Id: I70bdea652ee0186aae6109db1ae756780eaa54b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoBump versions to 6.0.4-SNAPSHOT 64/108164/1
Robert Varga [Mon, 2 Oct 2023 16:59:22 +0000 (18:59 +0200)]
Bump versions to 6.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I72d3516453d2a222698d4c7a3243543c1ae65f3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRelease yangtools v11.0.3
jenkins-releng [Mon, 2 Oct 2023 15:31:55 +0000 (15:31 +0000)]
Release yangtools

7 months agoImprove InMemoryDataTreeModification state management 98/107698/8
Robert Varga [Mon, 4 Sep 2023 21:23:11 +0000 (23:23 +0200)]
Improve InMemoryDataTreeModification state management

We have an int here, which allows us to express multiple states. Improve
state tracking defensiveness to differentiate between "open" state and
two states ready() goes through.

This means we can detect when ready() ends up not completing
successfully as observed by other validation code.

JIRA: YANGTOOLS-1539
Change-Id: I10a233adf53029d14ba37751cc3cc9f38fc2a85d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoBump odlparent to 13.0.5 65/108065/5
Robert Varga [Fri, 29 Sep 2023 16:37:30 +0000 (18:37 +0200)]
Bump odlparent to 13.0.5

Adopt latest fixes from upstream.

Change-Id: Ie1cd315eb8002e560e7c978d7c63c1739a7fe3fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoConvert parser extensions into JPMS modules 94/108094/3
Robert Varga [Sun, 1 Oct 2023 16:04:11 +0000 (18:04 +0200)]
Convert parser extensions into JPMS modules

These are some of of the final pieces of conversion, perform the trivial
conversion.

Change-Id: I9e2f08b428948faec8949fae175d0f04ee7c9484
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMake model prefix handling optional 80/108080/3
Robert Varga [Sat, 30 Sep 2023 00:22:32 +0000 (02:22 +0200)]
Make model prefix handling optional

Taking model-based prefixes into account is bound to change our output,
making the encoding a tad more dense. Make the feature selectable by
users as a first step, with an eye towards making it the default.

JIRA: YANGTOOLS-1544
Change-Id: Icedf67b408182e57a99d5d1f52f728c3f64c8657
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoClean up NamespacePrefixesTest 91/108091/1
Robert Varga [Sun, 1 Oct 2023 14:51:12 +0000 (16:51 +0200)]
Clean up NamespacePrefixesTest

Now that we have moved decode(), we can specialize it to asserts,
cleaning things up a bit.

Change-Id: I073fde327587bcc78619b2c227f01a5f24057d40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoSimplify YT1108Test 71/108071/1
Robert Varga [Fri, 29 Sep 2023 19:13:11 +0000 (21:13 +0200)]
Simplify YT1108Test

Migrate to xmlunit-core and eliminate all the cruft we have surrounding
with setting up the comparison.

Change-Id: Iae46ece0c9c60bbb4d87a617dc7aed768d51b903
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoRemove references to TestCase 70/108070/1
Robert Varga [Fri, 29 Sep 2023 19:00:37 +0000 (21:00 +0200)]
Remove references to TestCase

All we are doing is subclassing and routing to XMLAssert. Just route a
static call.

Change-Id: I786cef83dea43af0d10fab72da202a0989099acb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate SchemaOrderedNormalizedNodeWriterTest 69/108069/1
Robert Varga [Fri, 29 Sep 2023 18:42:38 +0000 (20:42 +0200)]
Migrate SchemaOrderedNormalizedNodeWriterTest

Migrate one test case to xmlunit-core. Migrate the other test case to a
simple asserEquals() as it is a single line.

Change-Id: If2042c107b6200973de9945b74f8841c377b2639
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate yang-model-export to xmlunit-core 66/108066/2
Robert Varga [Fri, 29 Sep 2023 17:09:49 +0000 (19:09 +0200)]
Migrate yang-model-export to xmlunit-core

Migrate legacy comparison, fixing up expected data, as we maintain the
proper order.

Change-Id: I0e243cd7ba4f95e7bd36b23a0fcd7592d08dfce7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoEliminate xmlunit-legacy from yang-data-impl 67/108067/2
Robert Varga [Fri, 29 Sep 2023 17:20:09 +0000 (19:20 +0200)]
Eliminate xmlunit-legacy from yang-data-impl

We have only a single unused class here, remove it and ditch dependency
on xmlunit.

Change-Id: I722c804b6a7c7dfcf15e077f718ba4b47b128086
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoEnforce mocking in yang-data-codec-xml tests 28/108028/11
Robert Varga [Thu, 28 Sep 2023 19:22:18 +0000 (21:22 +0200)]
Enforce mocking in yang-data-codec-xml tests

Pull in our mockito-configuration, so that we correctly mock all
interactions.

Change-Id: I065b44f7fc62a052475892738a310e7894962da6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoUse YANG-derived prefixes 30/108030/15
Robert Varga [Thu, 28 Sep 2023 20:33:47 +0000 (22:33 +0200)]
Use YANG-derived prefixes

All XML examples starting from RFC6020 onwards use a module's prefix to
identify the module.

This is not something that is universally feasible to do, as the
document context may indicate a different namespace mapping, which may
be more efficient to use.

Such assignments may also conflict with already-assigned prefixes and
redefining XML namespaces increases cognitive load in analysis -- hence
we have to avoid that.

Also prefix assignments are not a global namespace, so we could easily
end up with ambigous mappings. This is unlikely, but it can easily
happen.

With an EffectiveModelContext we can perform analysis on what is valid
within that enclosed world and use that as a guide. When
NamespacePrefixes decides current RandomPrefix (which is not random at
all!) does not have a mapping, we can consult an analysis object to give
us guidance.

This patch renames RandomPrefix to 'NamespacePrefixes' and introduces
PreferredPrefixes, which can be computed from an EffectiveModelContext.

These two then act in unison to assign prefixes based on prefix
statements present in modules forming an EffectiveModelContext whenever
we need to do such a thing.

JIRA: YANGTOOLS-1544
Change-Id: Iafc5806f53d8927e46f059287e2ae3ed2c77ff26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoClean up XML instance identifier class naming 26/108026/8
Robert Varga [Thu, 28 Sep 2023 17:39:39 +0000 (19:39 +0200)]
Clean up XML instance identifier class naming

Naming of things here is not great. We have two distinct implementations
of a full Codec, one of which can handle serialization and the other can
handle parsing.

Clean up naming, by having a top-level, fixed,
InstanceIdentifierXmlCodec, which is what we give users. We then have
InstanceIdentifier{Deserializer,Serializer}, which are bound, single-use
delegates.

This allows us to ditch the thread local stack we have been keeping to
deal with the fact that the implementation is directly internal.

Furthermore we optimize instantiation, so that we minimize the number of
calls to DataSchemaContextTree.from().

JIRA: YANGTOOLS-1543
Change-Id: I1ca884fe57086311111f12b3ba223d08f3676a93
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoFix XML instance identifier encoding 09/108009/10
Robert Varga [Thu, 28 Sep 2023 15:19:05 +0000 (17:19 +0200)]
Fix XML instance identifier encoding

XmlStringInstanceIdentifierCodec is not encoding prefixes properly. Use
the same trick we use for normal writeout.

Also improve mocking to cover all interactions we expect to happen.

JIRA: YANGTOOLS-1543
Change-Id: Ie018137599bd5a79db962da9573cbbca6bfc0599
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoMigrate RandomPrefixTest to JUnit5 29/108029/4
Robert Varga [Thu, 28 Sep 2023 19:45:46 +0000 (21:45 +0200)]
Migrate RandomPrefixTest to JUnit5

Hide the test and clean it up.

Change-Id: I7c5ddc6d04e40e42967089ccea9777347a4daa30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoReparent RandomPrefixInstanceIdentifierSerializer 27/108027/1
Robert Varga [Thu, 28 Sep 2023 18:33:54 +0000 (20:33 +0200)]
Reparent RandomPrefixInstanceIdentifierSerializer

We are the only direct subclass of
AbstractStringInstanceIdentifierCodec, which is a direct superclass of
AbstractModuleStringInstanceIdentifierCodec.

Use the latter as superclass, opening up the possiblity of merging the
two abstract classes.

Change-Id: Iee985fb54b102c4764fa4e9685652762db5265b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoClean up XmlStringInstanceIdentifierCodec instantiation 25/108025/1
Robert Varga [Thu, 28 Sep 2023 17:21:32 +0000 (19:21 +0200)]
Clean up XmlStringInstanceIdentifierCodec instantiation

We are inherently tied to the model context of our XmlCodecFactory.
Simplify the constructor and do not store the EffectiveModelContext.

Change-Id: I7676813295275926642018665908f11ec47f402b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoDo not pass null to codec 18/108018/2
Robert Varga [Thu, 28 Sep 2023 17:06:20 +0000 (19:06 +0200)]
Do not pass null to codec

We are expecting a checked exception and are passing a null argument for
something which we are supposed to interact with. Use a proper mock for
argument. This will allow us to further extend verification should the
implementation change.

JIRA: YANGTOOLS-1543
Change-Id: I0f1defd442ae60ee9e9b1b7a43949eed320ac148
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoImprove YT1473Test stubbing 16/108016/3
Robert Varga [Thu, 28 Sep 2023 16:55:28 +0000 (18:55 +0200)]
Improve YT1473Test stubbing

Execute this test with MockitoExtension, which automatically verifies
all subbings. Refactor assertions accordingly.

JIRA: YANGTOOLS-1543
Change-Id: I099611b575f6a0775600c03e5f3edca41ff0bdd5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoModernize SchemaAwareXMLStreamWriterUtils a bit 13/108013/3
Robert Varga [Thu, 28 Sep 2023 16:02:36 +0000 (18:02 +0200)]
Modernize SchemaAwareXMLStreamWriterUtils a bit

Do not implemented EffectiveModelContextProvider to improve visibility
into invocations. Also use local variable type inference for brevity.

Change-Id: I3141562b0050435ed79f9bd06aa2dac03e59ec08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoSimplify SchemaAwareXMLStreamNormalizedNodeStreamWriter 14/108014/1
Robert Varga [Thu, 28 Sep 2023 16:04:48 +0000 (18:04 +0200)]
Simplify SchemaAwareXMLStreamNormalizedNodeStreamWriter

There is no need to implement EffectiveModelContext provider here.

Change-Id: I39585b8dc2cefa844110ccf87aa52e9e925599f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoModernize SchemaAwareXMLStreamNormalizedNodeStreamWriter a bit 12/108012/1
Robert Varga [Thu, 28 Sep 2023 16:01:25 +0000 (18:01 +0200)]
Modernize SchemaAwareXMLStreamNormalizedNodeStreamWriter a bit

Use instanceof patterns to eliminate explicit casts.

Change-Id: I63e7dc828c03ea4110793b9dd86f0add1ac16c0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoInline yt1107.xml 08/108008/1
Robert Varga [Thu, 28 Sep 2023 14:35:49 +0000 (16:35 +0200)]
Inline yt1107.xml

There is no need to keep this XML in a resource, inline it in its sole
user.

Change-Id: Ie8c99320c8c97263b502caed9e5de2a75ea11581
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoModernize XMLStreamWriterUtils 99/107999/1
Robert Varga [Wed, 27 Sep 2023 20:11:26 +0000 (22:11 +0200)]
Modernize XMLStreamWriterUtils

Use instanceof patterns and local variable type inference.

Change-Id: I13ace859c67f508955666d7a8f6599b66b083d96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoImprove context reporting 56/107956/1
Robert Varga [Fri, 22 Sep 2023 23:56:17 +0000 (01:56 +0200)]
Improve context reporting

If we fail at first step, we end up emitting an empty string, which
makes the output not nice. Quote the emitted string.

Change-Id: Ic54f7fd69a902de03205355b37fdc72d9979c051
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoReport checked exception in instance identifier writeout 55/107955/1
Robert Varga [Fri, 22 Sep 2023 23:33:03 +0000 (01:33 +0200)]
Report checked exception in instance identifier writeout

Both XML and JSON codecs are talking to a source of
IllegalArgumentExceptions. They should convert them to
XMLStreamException/IOException.

JIRA: YANGTOOLS-1542
Change-Id: Ia5ac633e37ed19c29d4593e2e886501c7baa59dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 months agoBump versions to 11.0.3-SNAPSHOT 89/107889/1
Robert Varga [Sat, 16 Sep 2023 11:09:02 +0000 (13:09 +0200)]
Bump versions to 11.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Id3564853cacd73318084422d35784225a2571627
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>