yangtools.git
3 months agoCleanup mockito-configuration 98/109698/1
Robert Varga [Wed, 10 Jan 2024 12:33:11 +0000 (13:33 +0100)]
Cleanup mockito-configuration

Provide a MoreAnwers class, which exposes an THROWS_UNSTUBBED_METHOD
answer.

Also split out implementation into org.opendaylight.mockito, so that we
do not risk a class name collision.

Change-Id: I20c61b5ca7b83fba9da6fe16594c69bfc46b71ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoModernize ArgumentsExtractorVerifier 97/109697/1
Robert Varga [Wed, 10 Jan 2024 12:23:53 +0000 (13:23 +0100)]
Modernize ArgumentsExtractorVerifier

Refactor methods to keep the flow simpler.

Change-Id: I079aae8c738ace034bf01579f998cbbfcc879675
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse instanceof pattern 71/109671/2
Robert Varga [Mon, 8 Jan 2024 01:37:25 +0000 (02:37 +0100)]
Use instanceof pattern

Simplify equals() implementation a bit.

Change-Id: I2c0070df979e9d81b98445b3e166a457fb851225
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump versions to 13.0.1-SNAPSHOT 73/109673/1
Robert Varga [Mon, 8 Jan 2024 01:39:27 +0000 (02:39 +0100)]
Bump versions to 13.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie812e95612992cf7c9dbcd7fefde6dd460aaf460
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRelease yangtools v13.0.0
jenkins-releng [Sun, 7 Jan 2024 22:27:34 +0000 (22:27 +0000)]
Release yangtools

3 months agoSwitch yang-ir to bnd-parent 68/109668/3
Robert Varga [Sun, 7 Jan 2024 18:30:11 +0000 (19:30 +0100)]
Switch yang-ir to bnd-parent

This is a simplistic bundle, switch to to bnd-parent so we get control
over exported packages.

Change-Id: I77cc05d2cca5b4e4084e407ff83a2e6cb9914def
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRename YangIRSchemaSource 67/109667/3
Robert Varga [Sun, 7 Jan 2024 18:13:13 +0000 (19:13 +0100)]
Rename YangIRSchemaSource

YangIRSource is a more concise name. Also add a bit of documentation.

Change-Id: I259c41c2defd0418854e8766f730dda83e3cb4cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCleanup dependencies 65/109665/2
Robert Varga [Sun, 7 Jan 2024 18:06:32 +0000 (19:06 +0100)]
Cleanup dependencies

The movement of {Yin,Yang}TextSource has implications on dependencies,
clean them up.

JIRA: YANGTOOLS-1561
Change-Id: I4bdc5522b8a4135352a8de494f36ecbf3a11531d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse plain AssertionError 66/109666/2
Robert Varga [Sun, 7 Jan 2024 18:08:27 +0000 (19:08 +0100)]
Use plain AssertionError

AssertionFailedError introduces an unneeded dependency, remove its users.

Change-Id: I66a8e812fb914f76812e01b58101ca847fe4046b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMove YangTextSource 55/109655/10
Robert Varga [Sun, 7 Jan 2024 17:28:58 +0000 (18:28 +0100)]
Move YangTextSource

YangTextSource is something defined in RFC6020, really, expose this
construct at yang-model-api level.

JIRA: YANGTOOLS-1561
Change-Id: Ic1f0d5c37fe66d216749cfbafe0efa798bcd83f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExpose FileYangTextSource 64/109664/4
Robert Varga [Sun, 7 Jan 2024 16:55:03 +0000 (17:55 +0100)]
Expose FileYangTextSource

Rather than having a plethora static factory methods, just expose
FileYangTextSource and use it as appropriate.

JIRA: YANGTOOLS-1561
Change-Id: I0efbd6bdcff32bb0079a5b974797320cbc3c88fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExpose URLYangTextSource 63/109663/3
Robert Varga [Sun, 7 Jan 2024 15:51:24 +0000 (16:51 +0100)]
Expose URLYangTextSource

Rather than having a plethora of static factory methods, expose only a
few constructors.

JIRA: YANGTOOLS-1561
Change-Id: I4dee89e9243191bdf4d6bf2f1d6e5f1f71a5fd68
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMove YinTextSource to yang.model.api.source 62/109662/4
Robert Varga [Sun, 7 Jan 2024 15:16:48 +0000 (16:16 +0100)]
Move YinTextSource to yang.model.api.source

YinTextSource is something defined in RFC6020, really, expose this
construct at yang-model-api level.

JIRA: YANGTOOLS-1561
Change-Id: Icbfa6a96a11090031c95595da14e92b888f06f23
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoExpose FileYinTextSource 61/109661/4
Robert Varga [Sun, 7 Jan 2024 15:00:22 +0000 (16:00 +0100)]
Expose FileYinTextSource

Rather than having static factory methods, expose FileYinTextSource.

JIRA: YANGTOOLS-1561
Change-Id: I02399316cb1d9f009f299abffbf1c31cf666e418
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoExpose URLYinTextSource 60/109660/2
Robert Varga [Sun, 7 Jan 2024 14:49:59 +0000 (15:49 +0100)]
Expose URLYinTextSource

Eliminate YinTextSource static methods in favor of exposing
URLYinTextSource.

JIRA: YANGTOOLS-1561
Change-Id: I444478a417988f4532310f52d1e73bed236932e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoExpose DelegatedYinTextSource 59/109659/3
Robert Varga [Sun, 7 Jan 2024 14:37:23 +0000 (15:37 +0100)]
Expose DelegatedYinTextSource

Eliminate YinTextSource static methods in favor of making
DelegatedYinTextSource visible.

JIRA: YANGTOOLS-1561
Change-Id: I77b5223facb3de7ed216fd556ae0bd9d95fb6927
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoExpose DelegatedYangTextSource 58/109658/2
Robert Varga [Sun, 7 Jan 2024 14:13:40 +0000 (15:13 +0100)]
Expose DelegatedYangTextSource

Eliminate YangTextSource static methods in favor of making
DelegatedYangTextSource visible. This also eliminates the slew of
possibilitiess down to the bare bones -- users can cope with the trivial
conversions from ByteSource and file name.

JIRA: YANGTOOLS-1561
Change-Id: I2321e9d936489fefe059399a750393b76730e297
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoBump versions to 13.0.0-SNAPSHOT 57/109657/2
Robert Varga [Sun, 7 Jan 2024 13:38:19 +0000 (14:38 +0100)]
Bump versions to 13.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: Ib7947413210db54a81f298caee9716800c504c84
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRehost SourceIdentifier methods 56/109656/1
Robert Varga [Sun, 7 Jan 2024 12:46:51 +0000 (13:46 +0100)]
Rehost SourceIdentifier methods

SourceIdentifier is aware of .yang, expand its capabilities to also
parse file names to extract revision and handle .yin.

JIRA: YANGTOOLS-XXX
Change-Id: I5c41707677a9b8b75d81987f740a48162e2c8689
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoExpose NotRevision 51/109651/2
Robert Varga [Sat, 6 Jan 2024 01:45:38 +0000 (02:45 +0100)]
Expose NotRevision

Having RevisionUnion.none() exposing a type-safe object is useful.
Expose NotRevision and improve the test suite.

Change-Id: I0217ade57c73c65d6ce903c07b696246881aec4e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMigrate YangVersionTest 50/109650/1
Robert Varga [Sat, 6 Jan 2024 00:53:22 +0000 (01:53 +0100)]
Migrate YangVersionTest

Use non-deprecated methods and upgrade the deprecation.

Change-Id: Ia9875471fd3bdfed1586319af317d57ca35ca9b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoConvert yang-model-api to bnd-parent 46/109646/2
Robert Varga [Fri, 5 Jan 2024 17:57:49 +0000 (18:57 +0100)]
Convert yang-model-api to bnd-parent

Modernize packaging and embrace the wonderful world of
explicitly-controlled exports.

Change-Id: Ied805ae32dcb72ba501e29c0733007a4407cb9c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up yang-model-api mocking 45/109645/2
Robert Varga [Fri, 5 Jan 2024 17:32:06 +0000 (18:32 +0100)]
Clean up yang-model-api mocking

Use mockito-configuration and MockitoExtension to be really crisp about
mocking.

Change-Id: I9102c75f15ef7cd114f656d28c94c92c54e4bd60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoBump versions to 12.0.1-SNAPSHOT 47/109647/1
Robert Varga [Fri, 5 Jan 2024 19:41:20 +0000 (20:41 +0100)]
Bump versions to 12.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I7736a158ad4ae7111708045c990a09d9921f4b24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRelease yangtools v12.0.0
jenkins-releng [Fri, 5 Jan 2024 18:15:14 +0000 (18:15 +0000)]
Release yangtools

4 months agoAdd BuildSpecification 26/109626/15
Robert Varga [Thu, 4 Jan 2024 09:21:34 +0000 (10:21 +0100)]
Add BuildSpecification

A BuildSpecification is the set of information we want to build,
mirroring YangLibModuleSet to some degree, but actually captures our
workflows, i.e. our ability to have multiple implemented revisions of
the same module.

This patch just adds it as a pivot, adjusting yang-parser-spi
dependencies accordingly.

JIRA: YANGTOOLS-1341
Change-Id: I3b3f1569fd4e8251cbac71f5036e6354b8fac942
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoGuard against empty YangInstanceIdentifier values 67/104867/6
Robert Varga [Mon, 13 Mar 2023 22:57:42 +0000 (23:57 +0100)]
Guard against empty YangInstanceIdentifier values

Empty YangInstanceIdentifier should never be used as a value. Check this
invariant.

JIRA: YANGTOOLS-1494
Change-Id: I3763cb45cb0131a9cbc25aaef65673a08f6dc470
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd RevisionUnion 23/109623/9
Robert Varga [Thu, 4 Jan 2024 05:04:50 +0000 (06:04 +0100)]
Add RevisionUnion

The intrinsic nullness of Revision is quite problematic, especially when
we are interfacing the world of ietf-yang-library.

Introduce RevisionUnion, which models the ietf-yang-library union of a
revision-identifier and an empty string.

JIRA: YANGTOOLS-918
Change-Id: I2641eba8f27d71f750079b2713474e07393fddf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMove YangIRSchemaSource 29/109629/13
Robert Varga [Thu, 4 Jan 2024 15:52:06 +0000 (16:52 +0100)]
Move YangIRSchemaSource

Let's call this model.spi.source.YangIRSource and clean up its
interface.

As this brings things closer to where they should be, we can now use
StatementSourceException to unify the layout of our error messages and
have TextStatementReference a readily-available implementation.

Reactor is updated to recognize StatementSourceException instead of
SourceExceptions. This has the benefit of allowing us to disconnect
InferenceException from SourceException.

JIRA: YANGTOOLS-1150
Change-Id: I8b43ada04065c5183e599d48a84912a36aa6e54b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd serialization proxy for Revision 39/109639/2
Robert Varga [Fri, 5 Jan 2024 12:19:10 +0000 (13:19 +0100)]
Add serialization proxy for Revision

As part of the yang.common.Revision redesign, we need to allow for a
migration strategy. This introduces RUv1, which acts as a serialization
proxy for a nullable String.

JIRA: YANGTOOLS-918
Change-Id: I3658df0364b86ca0739f1a5889dd364fa42675f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDisconnect InferenceException from SourceException 38/109638/2
Robert Varga [Thu, 4 Jan 2024 19:45:47 +0000 (20:45 +0100)]
Disconnect InferenceException from SourceException

These two exceptions indicate different conditions, split them up to
make sure the class hierarchy prevents confusing the two.

JIRA: YANGTOOLS-1150
Change-Id: I0313d42c009e30079ac8bf0619bc989d18c6b0a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse switch expressions in PathExpressionParser 37/109637/1
Robert Varga [Thu, 4 Jan 2024 19:56:38 +0000 (20:56 +0100)]
Use switch expressions in PathExpressionParser

We have two cases of trivially switch() statements, convert them to
switch expressions.

Change-Id: If5212d5e53dc12677e4973288d7ecd80c4192f3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRefactor ExplicitStatement 36/109636/7
Robert Varga [Thu, 4 Jan 2024 16:00:06 +0000 (17:00 +0100)]
Refactor ExplicitStatement

Rather than having a superclass, just create StatementDeclarations as a
host for the two factory methods. Implementations are completely
internal and do not leak outside of this class.

We also optimize memory footprint by using two versions of each class --
one storing file/line as ints, the other one as shorts. This ends up
saving a few bytes of memory.

Eliminate the InFile specialization, as it is not used anywhere really.
Also renale atPosition() to inText() to more closely align naming.

JIRA: YANGTOOLS-1150
Change-Id: Ib5a20e45f645f00fac8d1d27c48dd4dcab16fb17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd StatementDeclaration 32/109632/8
Robert Varga [Thu, 4 Jan 2024 15:41:46 +0000 (16:41 +0100)]
Add StatementDeclaration

We have only StatementInText capturing
StatementSourceReference+DeclarationReference. Add an explicit class to
hold this combination at model.api.meta level.

Also pull in the implementation of toHumanReadable() and add the
appropriate hooks.

JIRA: YANGTOOLS-1150
Change-Id: Ia6685a1a8d0d48ad12d223eefada2a2c527cb944
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove an explicit cast 31/109631/3
Robert Varga [Thu, 4 Jan 2024 11:51:41 +0000 (12:51 +0100)]
Remove an explicit cast

Use an instanceof pattern instead.

Change-Id: I4a8dcf3ba43fbf07cf6e79b805ebf59c327914a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMove message formatting to StatementSourceException 28/109628/2
Robert Varga [Thu, 4 Jan 2024 09:53:18 +0000 (10:53 +0100)]
Move message formatting to StatementSourceException

It would be nice to have consistent formatting relevant things -- and
SourceException already does something nice for typing message and
source together.

JIRA: YANGTOOLS-1150
Change-Id: Ib4b941fe4035edf887d9644a6b68570747b9d937
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPrefixResolver operates on non-null 25/109625/1
Robert Varga [Thu, 4 Jan 2024 09:17:17 +0000 (10:17 +0100)]
PrefixResolver operates on non-null

The prefix cannot legally be null, annotate that.

Change-Id: Iae55e8a450a3dd70eef11932f4f9f84f73a3b85d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd SourceDependency.isSatisfiedBy() 24/109624/3
Robert Varga [Thu, 4 Jan 2024 03:57:07 +0000 (04:57 +0100)]
Add SourceDependency.isSatisfiedBy()

Checking SourceDependency satisfaction can easily be centralized.

JIRA: YANGTOOLS-1150
Change-Id: I783380421cbf387bbdf25e89881b62cb4fcb4db0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAssert serialized Revision size 22/109622/1
Robert Varga [Thu, 4 Jan 2024 05:05:38 +0000 (06:05 +0100)]
Assert serialized Revision size

We have a serialization test, add an assertion on how big a string is.

Change-Id: Ia7b205d8e965cb8d86813cd1c662621748ea86c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoImprove serialization defensiveness of Revision 21/109621/1
Robert Varga [Thu, 4 Jan 2024 03:59:52 +0000 (04:59 +0100)]
Improve serialization defensiveness of Revision

Revision should never get serialized, hence it cannot be read in.

Change-Id: Icdc377ddf617e45973522d6ec237ece2b9c01ce9

4 months agoAdd @java.io.Serial 20/109620/1
Robert Varga [Thu, 4 Jan 2024 03:58:26 +0000 (04:58 +0100)]
Add @java.io.Serial

Annotate serialization field.

Change-Id: I24d9a8f19de3c39d49c68bb10a1a9b06d01b25b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoEliminate YangModelDependencyInfo 17/109617/6
Robert Varga [Wed, 3 Jan 2024 20:54:34 +0000 (21:54 +0100)]
Eliminate YangModelDependencyInfo

ModuleImport is a completely different concept to what we want to
express.

We already have SourceIdentifier, which matches the fields, but
unfortunately it has slightly different co-notations -- for a dependency
a missing revision says it is a wildcard.

We therefore create a dedicated construct, SourceDependency, which
really is a model.api.source contract.

This clarifies a lot of details about SourceInfo and DependencyResolver,
leading to complete elimination of YangModelDependencyInfo, making
DependencyResolve work on SourceInfo.

The extraction logic is hosted in YangIRSourceInfoExtractor, but we
expect it to mvoe to YangIRSchemaSource, once we have dealt with the
code structors within yang-parser-rfc7950.

JIRA: YANGTOOLS-1150
Change-Id: I913a03d2b2486e566d06f11b7f5f0d496f30c98f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up YangModelDependencyInfo 96/109596/2
Robert Varga [Wed, 3 Jan 2024 20:43:53 +0000 (21:43 +0100)]
Clean up YangModelDependencyInfo

Bring the two subclasses to the front of the file and annotate returns,
enforcing non-null as appropriate.

JIRA: YANGTOOLS-1150
Change-Id: Ic33c52d4d54de03243e6eb9ad1d1df9a96d5718c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up dependency declarations 95/109595/3
Robert Varga [Wed, 3 Jan 2024 19:20:03 +0000 (20:20 +0100)]
Clean up dependency declarations

Code movement we have made allows us to clean up dependencies. This
patch does that.

Change-Id: Ia01ead4410a421e0b1c0e8fe7d89377dc622720d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoImplement SourceInfo extraction 94/109594/2
Robert Varga [Wed, 3 Jan 2024 18:10:09 +0000 (19:10 +0100)]
Implement SourceInfo extraction

Create SourceInfo extractor and use it in YangModelDependencyInfo.

JIRA: YANGTOOLS-1150
Change-Id: I11a8912cd2b0abb05c0f6ee5ff0f3bc87ebe3947
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DataTreeCandidateNodesTest 86/109586/2
Robert Varga [Tue, 2 Jan 2024 18:43:58 +0000 (19:43 +0100)]
Clean up DataTreeCandidateNodesTest

Use MockitoExtension instead of explicit mocks. Also pull in
ImmutableNodes to ditch mocking of NormalizedNodes.

Change-Id: Iea956a411bce741fd7ae39b0d42621c166441ee2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoSeal YangModelDependencyInfo 93/109593/2
Robert Varga [Wed, 3 Jan 2024 18:02:16 +0000 (19:02 +0100)]
Seal YangModelDependencyInfo

We have two implementations, both of which are internal. Seal it.

Change-Id: Iacc9b5c39eba8fb7098d0596fdff08714bc5e170
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd SchemaSourceInfo 76/109576/32
Robert Varga [Tue, 2 Jan 2024 19:01:02 +0000 (20:01 +0100)]
Add SchemaSourceInfo

We typically need to organize SchemaSourceRepresentations in some way
and make consistency inferences against their linkage.

The RFCSs do not specifically call this out, but the information is kept
at the top of the YANG file, so that even a simple text parser can find
it quickly.

Our YANG text processing pipeline has this information available
whenever we need to build a YangModelDependencyInfo -- which is an
optional operation, but the implementation only needs IRSchemaSource.

This patch introduces SchemaSourceInfo, which is a RFC-based opinionated
version YangModelDependencyInfo.

JIRA: YANGTOOLS-1150
Change-Id: I5043f2be3138c6cf599cb8ca29c5bfb0c829625e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMigrate tests to use node.spi.ImmutableNodes 91/109591/3
Robert Varga [Wed, 3 Jan 2024 14:36:39 +0000 (15:36 +0100)]
Migrate tests to use node.spi.ImmutableNodes

We have a few stragglers, migrate them.

JIRA: YANGTOOLS-1259
Change-Id: Ie21d13359c7ec8d4b10f3ca4193460c478acefc3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoSchemaSourceException should carry SourceIdentifier 81/109581/15
Robert Varga [Tue, 2 Jan 2024 05:37:25 +0000 (06:37 +0100)]
SchemaSourceException should carry SourceIdentifier

We have two classes that already do this, codify this fact.

JIRA: YANGTOOLS-1150
Change-Id: I63bb778b21a063346bfa432734bc60fbb0bc1560
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd ImmutableNode.newXYXBuilder() methods 70/109570/6
Robert Varga [Mon, 1 Jan 2024 14:42:39 +0000 (15:42 +0100)]
Add ImmutableNode.newXYXBuilder() methods

Add convenience methods forwarding to BuilderFactory and migrate most
users of deprecated constructs.

JIRA: YANGTOOLS-1259
Change-Id: I78451bca62503f87422b285c48b5167b6819806a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd StatementSourceException 82/109582/13
Robert Varga [Tue, 2 Jan 2024 05:38:15 +0000 (06:38 +0100)]
Add StatementSourceException

There is a missing link between in model.api.meta, which is an exception
that carries a StatementSourceReference where it occurred.

JIRA: YANGTOOLS-1150
Change-Id: I75c08b90e049b620ba532163694102ef94bbd5a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote SchemaSourceRepresentation 85/109585/11
Robert Varga [Tue, 2 Jan 2024 09:04:51 +0000 (10:04 +0100)]
Promote SchemaSourceRepresentation

SchemaSourceRepresentation is an extensible framework for identifying
and working with sources of YANG schema, which eventually can become
yang.model.api constructs.

SchemaSourceRepresentation and its two immediate specializations are
landing in yang.mode.api.source, the actual implementations in
yang.model.spi.source.

JIRA: YANGTOOLS-1150
Change-Id: I10d0b3afd29f6b96b98ea8ffca0ca1c0b8ec44f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not provide SourceIdentifiers from extensions 84/109584/3
Robert Varga [Tue, 2 Jan 2024 08:33:14 +0000 (09:33 +0100)]
Do not provide SourceIdentifiers from extensions

These constants are artificially holding down yang-repo-api and are not
used anywhere. remove them and clean up dependencies.

JIRA: YANGTOOLS-1150
Change-Id: I7a7b3cb410e815257bd8949ba2a948a39512551d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote StatementSourceReference to model.api.meta 80/109580/4
Robert Varga [Tue, 2 Jan 2024 04:57:08 +0000 (05:57 +0100)]
Promote StatementSourceReference to model.api.meta

This class simply captures a few model.api.meta constructs, host it
where its brethren are.

JIRA: YANGTOOLS-1150
Change-Id: I8cd75e3c40ebb05dc7377b09fc9b282f014fd6dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove EffectiveModelContext{Listener,Provider} 75/109575/5
Robert Varga [Mon, 1 Jan 2024 19:48:07 +0000 (20:48 +0100)]
Remove EffectiveModelContext{Listener,Provider}

These are useless things that introduce verbosity.

At the end of the day, EffectiveModelContextProvider is someone who has

  EffectiveModelContext modelContext()

method -- which is but an idiom.

If we need to throw in a source of ISEs and callbacks, we are modeling
something much different -- better expressed explicitly where needed.

Change-Id: I6b1c11b01a0656a6a373e0d9b940607ee7a20aa0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoModernize ArgumentContextUtils 79/109579/4
Robert Varga [Tue, 2 Jan 2024 02:46:21 +0000 (03:46 +0100)]
Modernize ArgumentContextUtils

Use new language features:
- switch expression for YangVersion parsing
- instanceof patterns for type dispatch
- arrow cases for confiment
- multiline literal for simpler maintenance

Change-Id: Id23bf974f61b3e31abe0191e47192458a43e61ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMigrate YT1417Test 73/109473/1
Robert Varga [Fri, 29 Dec 2023 07:38:55 +0000 (08:38 +0100)]
Migrate YT1417Test

We have simple interactions here, migrate them to new methods.

JIRA: YANGTOOLS-1529
Change-Id: Ic2ad8122a61690c1ad22a7ef9484a4ea267a0fce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMigrate ImmutableNodes users 70/109470/1
Robert Varga [Fri, 29 Dec 2023 07:02:00 +0000 (08:02 +0100)]
Migrate ImmutableNodes users

This is a first pass on ImmutableNodes users, migrating them from
yang-data-impl to yang-data-spi version of this class.

JIRA: YANGTOOLS-1529
Change-Id: I7add26830e008f33f281bb1ec065f1f855d1eb55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up TypeDefinitionAwareCodec 69/109469/1
Robert Varga [Fri, 29 Dec 2023 06:54:22 +0000 (07:54 +0100)]
Clean up TypeDefinitionAwareCodec

Representation class should be the first argument and we should always
require a TypeDefinition.

Change-Id: I1bb1b40de807cd36c2622c8966ab9c4db161f8f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoIntroduce {LeafSet,Map}Node.Builder 52/109452/5
Robert Varga [Fri, 29 Dec 2023 00:13:05 +0000 (01:13 +0100)]
Introduce {LeafSet,Map}Node.Builder

Having an intermediate interface holding common bits between
{System,User}LeafSetNode.Builder is useful. This patch introduces a
sealed class to capture those bits.

JIRA: YANGTOOLS-1259
Change-Id: Ie1aba04a42308cf22054936e12a041ca90888c6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoPromote ImmutableNodes to yang-data-spi 86/104786/6
Robert Varga [Thu, 28 Dec 2023 12:47:10 +0000 (13:47 +0100)]
Promote ImmutableNodes to yang-data-spi

Immutable implementations of NormalizedNodes are generally useful for
basic operation of other NormalizedNode implementations -- for example
in the case of a lazily-materialized NormalizeNode.

Move Immutable*NodeBuilders to data.spi.node.impl, hiding them from
outside world and splitting out the actual implementations.

Builders are available indirectly through
data.spi.node.ImmutableNodes.builderFactory(), which centralizes access
and allows us to apply globally-configurable policy to builders (in a
future patch).

yang.data.impl.schema.{Builders,ImmutableNodes} are deprecated for
removal.

JIRA: YANGTOOLS-1259
Change-Id: I9eaaebcde5ce1b61e117ac712276d9288249b51a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoSeal NormalizedNode hierarchy 06/109406/13
Robert Varga [Fri, 22 Dec 2023 15:51:48 +0000 (16:51 +0100)]
Seal NormalizedNode hierarchy

This patch ensures that all of NormalizedNode interface hierarchy is
sealed, so users can rely on instanceof exhaustiveness.

As a side-effect of this change, we promote
node.spi.AbstractNormalizedNode into the API package and create a mirror
class hierarchy around it.

This hierarchy is then extende by the immutable implementations. This
adds a bit of code duplication, but it also makes it very clear what the
expectations are.

We have flushed out a couple of bugs in the process -- like
LeafSetEntryNode not protecting byte[] children.

JIRA: YANGTOOLS-1259
Change-Id: I0764278cff74a482c74381e6b5e4787ffc3f87e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
5 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>