yangtools.git
3 years agoConvert BaseStatementSupport 30/90830/4
Robert Varga [Tue, 30 Jun 2020 21:30:55 +0000 (23:30 +0200)]
Convert BaseStatementSupport

Convert the trivial case of base statement, which can be
easily minimized.

JIRA: YANGTOOLS-1065
Change-Id: If575ee91c1266b500655a96321e938c2abb849cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert ArgumentStatementSupport 38/90838/3
Robert Varga [Wed, 1 Jul 2020 08:14:55 +0000 (10:14 +0200)]
Convert ArgumentStatementSupport

Convert the trivial case of argument statement, which can be
easily minimized.

Change-Id: I9f28c3a71d4330fed8518d0866a4a9008df132db
JIRA: YANGTOOLS-1065
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert MaxElementsStatementSupport 36/90836/4
Robert Varga [Wed, 1 Jul 2020 07:30:56 +0000 (09:30 +0200)]
Convert MaxElementsStatementSupport

Convert the trivial case of max-elements statement, which can be
easily minimized.

JIRA: YANGTOOLS-1065
Change-Id: I47d91af7515e4ecd90776d7df2ae624cf265270f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert AbstractIncludeStatementSupport 28/90828/4
Robert Varga [Tue, 30 Jun 2020 21:19:45 +0000 (23:19 +0200)]
Convert AbstractIncludeStatementSupport

Convert the trivial case of include statement, which can be
easily minimized.

JIRA: YANGTOOLS-1065
Change-Id: If837cc29db300f084e19014ed0b09a5e5460aea9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert RevisionDateStatementSupport 25/90825/4
Robert Varga [Tue, 30 Jun 2020 16:31:49 +0000 (18:31 +0200)]
Convert RevisionDateStatementSupport

Convert the trivial case of revision-date statement, which can be
easily minimized.

JIRA: YANGTOOLS-1065
Change-Id: Ie21335714dc5ebc64f76d18e9c5b077e85dc6c69
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert ModifierStatementSupport 24/90824/3
Robert Varga [Tue, 30 Jun 2020 14:43:25 +0000 (16:43 +0200)]
Convert ModifierStatementSupport

Convert the trivial case of modifier statement, which can be easily
minimized.

JIRA: YANGTOOLS-1065
Change-Id: If2566654249f49ad63956cc062ae173c0cbbd5c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unneeded @NonNull annotations 37/90837/2
Robert Varga [Wed, 1 Jul 2020 08:07:40 +0000 (10:07 +0200)]
Remove unneeded @NonNull annotations

These are inherited from interface specification, no need to
repeat them.

Change-Id: I5d651e67372606d34f48b6ff0bb844ab15cca239
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDisconnect StmtNamespaceContext from statement 14/90814/3
Robert Varga [Mon, 29 Jun 2020 21:24:15 +0000 (23:24 +0200)]
Disconnect StmtNamespaceContext from statement

Retaining a reference to any StmtContext is not good, as we end
up retaining the entire build context from each parsed XPath. Make
sure we maintain a simple disconnected YangNamespaceContext
implementation at each root.

JIRA: YANGTOOLS-1116
Change-Id: Ic327647b758c83b94bde05a740c51384f70c4d03
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not retain namespace context when not needed 12/90812/3
Robert Varga [Mon, 29 Jun 2020 19:51:04 +0000 (21:51 +0200)]
Do not retain namespace context when not needed

If we have not recorded presence of a literal expression, there
is no legal way we can be asked to resolve a literal to either
a QName or a YangInstanceIdentifier.

Track creation of YangLiteralExprs, so that we can ditch the
namespace context we will not need it.

JIRA: YANGTOOLS-1115
Change-Id: If1572fc57d78eaaea7feb3025a5a161519df2b9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate use of ImmutableList 05/90805/2
Robert Varga [Mon, 29 Jun 2020 10:18:15 +0000 (12:18 +0200)]
Eliminate use of ImmutableList

We can use a simple array, as we are only iterating over this
list.

Change-Id: I34a01bff7cb8da4f936f119fa80a699244c8f519
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix javadoc to comply with JDK14 78/90778/1
Robert Varga [Fri, 26 Jun 2020 19:57:44 +0000 (21:57 +0200)]
Fix javadoc to comply with JDK14

JDK14 has a stricter default doclet. Fix issues reported by it so
that the code can be compiled with JDK14.

Change-Id: Ieffe3450feeb0d4d9525f3434a17fd8e0dd8c0e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd YangInstanceIdentifier.create(PathArgument) 98/90698/1
Robert Varga [Thu, 25 Jun 2020 14:26:39 +0000 (16:26 +0200)]
Add YangInstanceIdentifier.create(PathArgument)

This is a short-circuit version of the varargs create(), which is
slighly faster.

Change-Id: Id6b6ae327cd8e5d63108c766532dd8ab91188637
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up AntlrXPathParser a bit 23/90623/1
Robert Varga [Wed, 24 Jun 2020 12:04:31 +0000 (14:04 +0200)]
Clean up AntlrXPathParser a bit

This cleans up instantiation so we can better communicate parser
state to the resulting expression.

JIRA: YANGTOOLS-1115
Change-Id: I111926b76f88ca2c4023cdd41b77d56768c38497
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse ImmutableMap collector in EnumStringCodec 21/90621/1
Robert Varga [Wed, 24 Jun 2020 10:05:52 +0000 (12:05 +0200)]
Use ImmutableMap collector in EnumStringCodec

Reduce the use of intermediate structures by using a direct
collector rather than collecting to a list and then performing
Maps.uniqueIndex().

Change-Id: I0d200211daa240076394af1d3e33ec4df26c146e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix reference to odl-antlr4 78/90578/1
Robert Varga [Mon, 22 Jun 2020 19:14:21 +0000 (21:14 +0200)]
Fix reference to odl-antlr4

This is a slight mistake, we should be referencing the feature
through a range.

Change-Id: I90cea9337596b4c714b7d38e61cea8f77b89e2d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate YangStatementStreamSource.getYangText() 22/90422/1
Robert Varga [Fri, 12 Jun 2020 08:07:59 +0000 (10:07 +0200)]
Deprecate YangStatementStreamSource.getYangText()

We do not need to leak this internal implementation detail,
remove is visibility.

Change-Id: I13be830b8dedff8478c9859cda2c6b1f44eabf31
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up YangParser.addLibSource() 21/90421/1
Robert Varga [Fri, 12 Jun 2020 06:36:49 +0000 (08:36 +0200)]
Speed up YangParser.addLibSource()

Since we are adding a single source only, we can go through
the single-argument method, making things a tad more efficient.

JIRA: YANGTOOLS-652
Change-Id: I676d8d2cbfdd854c9486a02e3c746cb13849d09c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd CrossSourceStatementReactor javadocs 19/90419/2
Robert Varga [Fri, 12 Jun 2020 06:32:05 +0000 (08:32 +0200)]
Add CrossSourceStatementReactor javadocs

Clarify interface contracts based on current behavior. Also add
a single-argument addLibSource().

JIRA: YANGTOOLS-652
Change-Id: I02829a2cb40ff03f38cc5136a16d76a4f4b27dd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up YangParser.addSource() 20/90420/2
Robert Varga [Fri, 12 Jun 2020 06:32:34 +0000 (08:32 +0200)]
Speed up YangParser.addSource()

Since we are adding a single source only, we can go through
the single-argument method, making things a tad more efficient.

JIRA: YANGTOOLS-652
Change-Id: I00519eb6fedaa9ab27b3b3f13bcc0b10b542f134
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 5.0.4-SNAPSHOT 63/90363/1
Robert Varga [Tue, 9 Jun 2020 22:33:39 +0000 (00:33 +0200)]
Bump versions to 5.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I95f22bc9119ddd26f6915b422cab6454b9febbe5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAllow list elements to be interleaved 75/90175/9
Jamo Luhrsen [Sun, 31 May 2020 05:29:52 +0000 (22:29 -0700)]
Allow list elements to be interleaved

If a list node A is parsed then list node B and another list with A
is given after, it fails to parse as a duplicate.

Skip checking for duplicate nodes if the node being parsed is found
to correspond to ListEffectiveStatement.

JIRA: YANGTOOLS-1107
Change-Id: I4dae263a1e41444db7a6cce6eb958f397c801070
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate ListEntryNodeDataWithSchema.forSchema() 49/90349/1
Robert Varga [Tue, 9 Jun 2020 12:35:07 +0000 (14:35 +0200)]
Deprecate ListEntryNodeDataWithSchema.forSchema()

This method should not be visible from outside of the package,
make sure we remove it.

Change-Id: I91ecb1439081862dc5d0241ff080b0db13bcaca2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSplit out addCompositeChild(CaseSchemaNode) 46/90346/1
Robert Varga [Tue, 9 Jun 2020 11:50:15 +0000 (13:50 +0200)]
Split out addCompositeChild(CaseSchemaNode)

Choices seem to have this special case, which we should be able to
wire without an explicit cast in most cases.

Change-Id: I5a398957190ccec49b2a9072638f489bbdabd984
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up variable initialization 45/90345/2
Robert Varga [Tue, 9 Jun 2020 11:34:04 +0000 (13:34 +0200)]
Clean up variable initialization

We can make local variable final and non-null, improving logic
flow in this method.

Change-Id: I2695acd5cccdef0da61b1f3e246fd9dbcb2e08a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd YangInstanceIdentifier.coerceParent() 05/90305/1
Robert Varga [Fri, 5 Jun 2020 15:41:08 +0000 (17:41 +0200)]
Add YangInstanceIdentifier.coerceParent()

There are a number of YangInstanceIdentifier users who perform
checks (or otherwise ensure) that YangInstanceIdentifier they are
dealing with is non-empty and hence its getParent() method cannot
possibly return null. These users still interact with methods
which explicitly require a non-null YangInstanceIdentifier -- hence
it would be useful to provide a bridge method which performs this
validation.

Change-Id: I7acb4b04ccbe3c536b690573519171af32089d41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd MultipleEntryDataWithSchema interface 01/90301/1
Robert Varga [Fri, 5 Jun 2020 13:54:51 +0000 (15:54 +0200)]
Add MultipleEntryDataWithSchema interface

We are sharing essentially the same code in both JSON and XML
parsers, where we really to make this common code exposed from
appropriate NodeDataWithSchema.

Centralizing the interface contract and implementations allows us
to ditch external users of CompositeNodeDataWithSchema.addChild(),
which is now deprecated.

Change-Id: I5aca3d3eecba3f9e6ffee4b9ee15e70afa47aed6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 7.0.3 97/90297/1
Robert Varga [Fri, 5 Jun 2020 08:43:51 +0000 (10:43 +0200)]
Bump odlparent to 7.0.3

Pick up fixes from upstream.

Change-Id: I1865f70f06454920c2dd9d3d04146ab5ca52e5dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd test for union with identity XML codec issue 36/90236/6
Anna Bencurova [Wed, 3 Jun 2020 16:28:36 +0000 (18:28 +0200)]
Add test for union with identity XML codec issue

JIRA: YANGTOOLS-1108
Change-Id: Ib33d1865c138474eae8b6fbf04c50688d8a4809a
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
3 years agoCheck unions for instance-identifier types 52/90252/2
Robert Varga [Thu, 4 Jun 2020 12:11:05 +0000 (14:11 +0200)]
Check unions for instance-identifier types

If an instance-identifier type is encountered within a union, we
end up going to TypeDefinitionAwareCodec, which is not equiped to
handle the complexities of XML-encoding instance identifiers. Make
sure we do perform a check to side-step this problem.

Change-Id: Ib5bc79a26808f4101ce182e092418a29e5b7bdc8
JIRA: YANGTOOLS-1108
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCheck unions for identityref types 50/90250/4
Robert Varga [Thu, 4 Jun 2020 11:06:06 +0000 (13:06 +0200)]
Check unions for identityref types

If an identityref type is encountered within a union, we end up
going to TypeDefinitionAwareCodec, which is not equiped to handle
the complexities of XML-encoding identityrefs. Make sure we do
perform a check to side-step this problem.

JIRA: YANGTOOLS-1108
Change-Id: I8dcf70385aceabc5f3e33a508ddd00f926047774
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoIssue a warning when we encounter a non-QName identityref 51/90251/5
Robert Varga [Thu, 4 Jun 2020 11:22:27 +0000 (13:22 +0200)]
Issue a warning when we encounter a non-QName identityref

identityref types are required to be normalized as a QName, but we
have a legacy fallback to using .toString(). Issue an explicit
warning when this happens.

JIRA: YANGTOOLS-1110
Change-Id: Ia9cfc824e03d7641c7081f479f7a4d6c7c98062c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSeparate out correct QName-bearing serialization method 49/90249/3
Robert Varga [Thu, 4 Jun 2020 10:54:41 +0000 (12:54 +0200)]
Separate out correct QName-bearing serialization method

We want to start deprecating .toString()-based codec, hence we want
to separate the happy path out.

JIRA: YANGTOOLS-1108
Change-Id: Ic5fa79c0649a73583eac4c043bd4c8b4b6b60bc0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove error message in UnionXmlCodec 48/90248/2
Robert Varga [Thu, 4 Jun 2020 10:45:24 +0000 (12:45 +0200)]
Improve error message in UnionXmlCodec

We are missing a space before value, which would not be properly
delineated.

JIRA: YANGTOOLS-1108
Change-Id: If6da40cd2653ef702e53730fa58923a7b310c3ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPropagate type to XMLStreamWriterUtils 47/90247/3
Robert Varga [Thu, 4 Jun 2020 10:14:59 +0000 (12:14 +0200)]
Propagate type to XMLStreamWriterUtils

We have a useless checkArgument here, which is impossible to hit
if we structure this just right.

JIRA: YANGTOOLS-1108
Change-Id: I589da629526026fa09c0dda9c11f0bd5516941a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 5.0.3-SNAPSHOT 33/90133/1
Robert Varga [Sat, 30 May 2020 11:08:01 +0000 (13:08 +0200)]
Bump versions to 5.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Icd6dab87e1f3b0ccb143d06e6df6da622525d1ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 7.0.2 31/90131/1
Robert Varga [Sat, 30 May 2020 01:27:06 +0000 (03:27 +0200)]
Bump odlparent to 7.0.2

Pick up latest upgrades to dependencies.

Change-Id: Ic3d0ec5426870aab1115fb339d0d5251aba81e45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoLink to odlparent docs 27/90127/2
Robert Varga [Sat, 30 May 2020 00:15:08 +0000 (02:15 +0200)]
Link to odlparent docs

We do not use odlparent, but link to it in case this ever changes.

Change-Id: Ic912a1e42429117aa93b95001d846d8346b4be16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove NormalizedNodeStreamVersion deprecation 03/90003/1
Robert Varga [Wed, 27 May 2020 12:35:48 +0000 (14:35 +0200)]
Move NormalizedNodeStreamVersion deprecation

There are a number of downstreams which need to handle deprecated
stream versions. Move deprecation to produces, so that we do not
warn when the enum value is used.

Change-Id: Iea46d3ab8f76502cb324d788711ddcaed0dcf555
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTeach SchemaAwareApplyOperation about anydata/anyxml 97/89997/3
Robert Varga [Wed, 27 May 2020 10:12:40 +0000 (12:12 +0200)]
Teach SchemaAwareApplyOperation about anydata/anyxml

When we encounter an anydata/anyxml element in schema, we should
not be ignoring it, cascading to a silent failure, but rather
treat it as a leaf-like node.

JIRA: YANGTOOLS-1104
Change-Id: I896a3b6e65fe8e5b897e71103d616b3e03f3c1b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify AbstractNodeContainerModificationStrategy 55/89955/4
Robert Varga [Tue, 26 May 2020 11:37:29 +0000 (13:37 +0200)]
Simplify AbstractNodeContainerModificationStrategy

Since we have NormalizedNodeContainer and we know this type, we
can eliminate a few casts, checks and warning suppressions by
retaining proper type safety.

Change-Id: I6e2d0f9fbb20cfe9fdb996544b8328a18576ca3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReturn EffectiveModelContext from StmtTestUtils 46/89946/2
Robert Varga [Tue, 26 May 2020 07:09:21 +0000 (09:09 +0200)]
Return EffectiveModelContext from StmtTestUtils

We are moving away from SchemaContext, make sure our test utilities
are up to it.

Change-Id: Iac60ae1c9fb3b8c8a9e62db6342bd0d099e71ca1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix an error message typo 49/89949/1
Robert Varga [Tue, 26 May 2020 10:11:22 +0000 (12:11 +0200)]
Fix an error message typo

We are missing a space here, making it hard to decode what
the source is. Fix that.

Change-Id: Ic9e18f88e3b59e19cd2cd5a529c29276ed9cab06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate docs badges 37/89637/2
Robert Varga [Thu, 7 May 2020 16:26:46 +0000 (18:26 +0200)]
Update docs badges

Update the pointer to docs, as these have changed quite some time
ago.

Change-Id: I59cf4c03b1c7c26bed95d94cb90ba93c66b30e17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd DataTreeCandidates.aggregate() method 35/88435/24
tadei.bilan [Mon, 16 Mar 2020 09:51:36 +0000 (11:51 +0200)]
Add DataTreeCandidates.aggregate() method

MD-SAL datastore access patterns allow for state compression to
occur, as changes are reported in terms of an ordered collection
of DataTreeCandidate objects.

These typically carry all state transitions, which an application
may (or may not) be interested in. In case an application does not
care about seeing all transitions, it may be beneficial to compress
these state transitions, so that they appear to have been caused
by a single transaction.

In order to achieve that, this patch introduces a new utility
method, DataTreeCandidates.aggregate(), which aggregates such a
collecting into a single DataTreeCandidate -- hence allowing
infrastructure components to perform state compression behind
application's back.

JIRA: YANGTOOLS-1014
Change-Id: I31094e303dbbb8430cb427ae6c59ee7956e0117c
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
4 years agoFix benchmarks 40/89440/2
Robert Varga [Mon, 27 Apr 2020 11:27:59 +0000 (13:27 +0200)]
Fix benchmarks

The benchmark was mis-generated ever since the compiler was
refactored. Fix it up.

Change-Id: Ia3c184b998b8d509aaf502e97d168c5d8d97b7a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate EffectiveModelContextProvider.getSchemaContext() 95/89395/2
Robert Varga [Sun, 26 Apr 2020 12:51:39 +0000 (14:51 +0200)]
Deprecate EffectiveModelContextProvider.getSchemaContext()

Steer users towards using EffectiveModelContext -- if they already
have an EffectiveModelContextProvider, they should not be using
getSchemaContext().

Change-Id: Ibcbfa9926a66a3890c1ae3b163c5a16841c2a716
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump versions tp 5.0.2-SNAPSHOT 30/89330/1
Robert Varga [Thu, 23 Apr 2020 20:38:42 +0000 (22:38 +0200)]
Bump versions tp 5.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I9b49ffba5404f4c7464839c9ee4f530866739267
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMountPointContext needs to expose EffectiveModelContext 17/89317/4
Robert Varga [Thu, 23 Apr 2020 14:08:29 +0000 (16:08 +0200)]
MountPointContext needs to expose EffectiveModelContext

This is an unfortunate API breakage, but it affects only @Beta
components. In order to be able to provide end-to-end services,
MountPointContext needs to operate on EffectiveModelContext.

JIRA: YANGTOOLS-1102
Change-Id: I64d3c2e1b28c84f5964c2b2da10cc3ef5f73b266
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOptimize LazyContainerNode.getChild() 69/89269/2
Robert Varga [Wed, 22 Apr 2020 14:29:20 +0000 (16:29 +0200)]
Optimize LazyContainerNode.getChild()

This just trims bytecode a bit by using an expression.

Change-Id: I20f8b6e10f42ff20f188f20991fbe0a8f0159396
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd NormalizedNodeContainer.size() 63/89263/2
Robert Varga [Wed, 22 Apr 2020 11:32:23 +0000 (13:32 +0200)]
Add NormalizedNodeContainer.size()

While the size of children is available through getValue(), it
is not completely efficient, as it may be forcing instantiation of
a Map.values() view.

Add NormalizedNodeContainer.size() to provide a more efficient way
of accessing this property. This has immediate benefits on both
MinMaxElementsValidation as well as general InMemoryDataTree
transaction performance.

JIRA: YANGTOOLS-1101
Change-Id: I607c2872645850400e4f242152059958729666b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump versions to 5.0.1-SNAPSHOT 23/89123/1
Robert Varga [Sat, 18 Apr 2020 12:11:52 +0000 (14:11 +0200)]
Bump versions to 5.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia30a69ec2b7dcfa598b3230c11bdba7bf74e56ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoClean up AbstractEffectiveDocumentedNode naming 22/89122/1
Robert Varga [Sat, 18 Apr 2020 09:21:48 +0000 (11:21 +0200)]
Clean up AbstractEffectiveDocumentedNode naming

We have two abstract classes here, make sure naming is matching
the naming of DocumentedNode.WithStatus.

Change-Id: I8604cc51e981477be7e90e3979113b64fb661a45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoHide LengthEffectiveStatementImpl 21/89121/2
Robert Varga [Sat, 18 Apr 2020 09:18:35 +0000 (11:18 +0200)]
Hide LengthEffectiveStatementImpl

We do not want to leak an implementation class across statements,
hence we are hiding it. In order to keep things working, update
LengthEffectiveStatement to extend ConstraintMetaDefinition.

Change-Id: I6e61eb06269a7991a5c7c0ac0089d159313d80c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoHide RangeEffectiveStatementImpl 20/89120/2
Robert Varga [Sat, 18 Apr 2020 09:14:21 +0000 (11:14 +0200)]
Hide RangeEffectiveStatementImpl

We do not want to leak an implementation class across statements,
hence we are hiding it. In order to keep things working, update
RangeEffectiveStatement to extend ConstraintMetaDefinition.

Change-Id: I056f93f4d3cef95f431d9f21423c8f8fa46f8a47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPush out FIXMEs to 6.0.0 19/89119/2
Robert Varga [Sat, 18 Apr 2020 09:03:32 +0000 (11:03 +0200)]
Push out FIXMEs to 6.0.0

We are ramping down for 5.0.0 release, hence we need to push out
remaining FIXMEs out.

Change-Id: Idf66e7907e9dae66b2e6dc9348d5f0b7dfeadf2d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate NormalizedNodeStreamVersion.{LITHIUM,NEON_SR2} 18/89118/1
Robert Varga [Sat, 18 Apr 2020 08:24:08 +0000 (10:24 +0200)]
Deprecate NormalizedNodeStreamVersion.{LITHIUM,NEON_SR2}

These version are ancient and do not support Uint types. Deprecate
them to steer users away from them.

Change-Id: Ib3d36cc87e1dd6b0043dc7e447f6ce122c678564
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix relative xPath resolution for leafref types 22/88422/10
miroslav.kovac [Fri, 13 Mar 2020 13:49:23 +0000 (14:49 +0100)]
Fix relative xPath resolution for leafref types

If we have a leaf of type leafref with relative path that crosses
through case and choice schema nodes.

This stems from the historic disconnect about how the path should
be handled: it needs to be resolved in the context of walking the
data tree, not schema tree. That means that choice/case nodes are
not part of the path in the expression and therefore need to be
skipped over.

JIRA: YANGTOOLS-1100
Change-Id: I9908c91b0068f52f4b6719545c738d7c39e2a228
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix boolean parsing leniency 92/89092/3
Robert Varga [Fri, 17 Apr 2020 10:46:00 +0000 (12:46 +0200)]
Fix boolean parsing leniency

RFC7950 explicitly requires that booleans be encoded as lower-case
"true" or "false", not anything else. Our attempt at leniency misfires
as we are doing the wrong thing if a boolean is coupled with a string
in a union.

JIRA: YANGTOOLS-1097
Change-Id: I6da2f22db7bfb57eec7b519663f2a84fee735cd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove TypeDefinitionAwareCodecTestHelper.getCodec() 91/89091/1
Robert Varga [Fri, 17 Apr 2020 10:55:18 +0000 (12:55 +0200)]
Improve TypeDefinitionAwareCodecTestHelper.getCodec()

We can be using the passed class and assertThat() to improve type
checks and remove a @SuppressWarnings.

Change-Id: I5e90c98c0914152faa720293666462691e794611
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMove yand.data.impl.codec tests 90/89090/1
Robert Varga [Fri, 17 Apr 2020 10:23:14 +0000 (12:23 +0200)]
Move yand.data.impl.codec tests

These tests are in the wrong package, fix that.

Change-Id: I8482e3608badce85586ce750d98aa635e3f3dc0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake BitsTypeDefinition.Bit.position() return Uint32 08/88808/5
Robert Varga [Tue, 31 Mar 2020 13:50:42 +0000 (15:50 +0200)]
Make BitsTypeDefinition.Bit.position() return Uint32

We seem to be brdiging back and forth between long and Uint32,
as PositionEffectiveStatement is defined in terms of Uint32. Bite
the bullet and convert Bit, too, removing a number of impossible
cases.

JIRA: YANGTOOLS-1072
Change-Id: I16a38b2780ca25b76eb8cc93c66546f9edb9d8b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate StmtContextUtils.producesDeclared() for removal 60/87360/6
Robert Varga [Sun, 2 Feb 2020 15:04:52 +0000 (16:04 +0100)]
Deprecate StmtContextUtils.producesDeclared() for removal

We will be removing this method in 5.0.0, mark it for removal.

Change-Id: Ibfb56c4e70ee48f7f8007fcd23ae3eca7686fe3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpstream StmtContextUtils.producesDeclared() 59/87359/7
Robert Varga [Sun, 2 Feb 2020 11:46:05 +0000 (12:46 +0100)]
Upstream StmtContextUtils.producesDeclared()

With Java 8 we can make this method readily available as a default,
without having to have it in a separate utils method.

Since we are at it, also introduce producesEffective(), which allows
us to infer details about the effective instance.

Also migrate open-coded equivalents to use the common method where
possible.

Change-Id: Ie2590c460296efea9fafe6a52bb3548bafe0ae0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove error reporting from data codecs 50/85450/12
Robert Varga [Thu, 31 Oct 2019 09:33:56 +0000 (10:33 +0100)]
Improve error reporting from data codecs

In order to improve error messages reported, we take advantage
of the previously-defined YangError interface and attach it to
IllegalYangValueException, which the values codecs report when
they encounter an invalid value.

JIRA: YANGTOOLS-763
Change-Id: I4952b9c186cb9438b72bd9a54ee81a2e8b43f5c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tadei Bilan <tadei.bilan@pantheon.tech>
4 years agoDo not issue duplicate warnings for lists missing keys 98/88998/2
Robert Varga [Thu, 9 Apr 2020 16:41:16 +0000 (18:41 +0200)]
Do not issue duplicate warnings for lists missing keys

We currently are issuing the config list warning for each instantiated
site, which ends up flooding our logs, as BGPCEP takes advantage of our
lenience -- leading to 3400+ warnings.

Make sure we flag each original list only once, suppressing other
instances of the violation. This presumably will provide enough guidance
while keeping the noise to a sane amount (~200 warnings).

JIRA: YANGTOOLS-1090
Change-Id: I2488ad7144c1827f7689d496669e4c97b62b0570
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake DeclarationInTextSource implement hashCode/equals 97/88997/2
Robert Varga [Thu, 9 Apr 2020 13:59:55 +0000 (15:59 +0200)]
Make DeclarationInTextSource implement hashCode/equals

In order to de-duplicate warnings, we will want to use
StatementSourceReference as a Set member, for which we need all
implementations to behave correctly w.r.t comparison.

JIRA: YANGTOOLS-1090
Change-Id: I18971e7681c02f56300a64cb08fda4bf4eef613a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd YangError interface 38/85738/6
Robert Varga [Sat, 9 Nov 2019 04:28:32 +0000 (05:28 +0100)]
Add YangError interface

This adds the interface for communicating details about a failure
triggered by a YANG-defined constraint.

JIRA: YANGTOOLS-176
Change-Id: I9139c086668742005490bd52d55fdb26e7ef70b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tadei Bilan <tadei.bilan@pantheon.tech>
4 years agoRefactor string unescaping 30/88330/12
vladyslav.marchenko [Fri, 6 Mar 2020 13:29:22 +0000 (15:29 +0200)]
Refactor string unescaping

Add explicit tests and rework unescaping of double-quoted strings
so that we do not use arcane patterns.

JIRA: YANGTOOLS-1079
Change-Id: I3b8bd13f260f13796492d19aea35c4c3f27760fc
Signed-off-by: vladyslav.marchenko <Vladyslav.Marchenko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 7.0.1 90/88990/1
Robert Varga [Thu, 9 Apr 2020 07:58:10 +0000 (09:58 +0200)]
Bump odlparent to 7.0.1

Import the latest version.

Change-Id: I68a7444d7d523482945697c3b6968d4c0fe820aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRequire at least maven-3.5.2 56/88856/2
Robert Varga [Thu, 2 Apr 2020 16:21:18 +0000 (18:21 +0200)]
Require at least maven-3.5.2

Do not pollute our build with old versions of stuff, require
a reasonably-recent maven-3.5.2+.

Change-Id: I2f5afb92a554a094564080e371f882f795ae303c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove list key presence checks 06/88806/2
Robert Varga [Tue, 31 Mar 2020 13:21:03 +0000 (15:21 +0200)]
Improve list key presence checks

A few statements are explicitly not part of instantiated tree, but
rather define a different data tree instance, which may be related
the instantiated tree.

We checked only for groupings, but we need to also consider input,
output and notification statements.

JIRA: YANGTOOLS-1090
Change-Id: I8f497ec2998b74388924d62c5dbef2b204ecefab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate to verifyNoInteractions() 54/88754/1
Robert Varga [Fri, 27 Mar 2020 17:36:34 +0000 (18:36 +0100)]
Migrate to verifyNoInteractions()

Mockito API has been updated, make sure we migrate.

Change-Id: I1e1f6ce06f02470ef2a6277945d3ada533f831f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoGroupingEffectiveStatement should be SchemaTreeAware 02/88702/3
Robert Varga [Thu, 26 Mar 2020 09:45:51 +0000 (10:45 +0100)]
GroupingEffectiveStatement should be SchemaTreeAware

The text of RFC7950 implies groupings act as entrypoints into
a schema tree -- it is not the the global schema tree, but each
grouping has its own. Make sure GroupingEffectiveStatement thus
provides efficient schema tree lookups.

JIRA: YANGTOOLS-1086
Change-Id: I1db2cd390eed77dcc2be977678027c6bd81b2a71
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not use SchemaNode.getPath() in assertions 52/88752/2
Robert Varga [Fri, 27 Mar 2020 14:30:01 +0000 (15:30 +0100)]
Do not use SchemaNode.getPath() in assertions

Reduce the number of callers to getPath() by not using the path
in assertion messages.

JIRA: YANGTOOLS-1091
Change-Id: I21d64795784dd3d9ff98a9ab0ee825a9f934e384
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMore getPath() implementation deprecation 51/88751/1
Robert Varga [Fri, 27 Mar 2020 14:10:32 +0000 (15:10 +0100)]
More getPath() implementation deprecation

This finishes up deprecation of SchemaNode.getPath() implementations.

JIRA: YANGTOOLS-1069
Change-Id: I0c738cb62cce13e42ee974486d8ea1bcd5cc080b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMove baseline SchemaContext methods 05/88705/2
Robert Varga [Thu, 26 Mar 2020 12:34:43 +0000 (13:34 +0100)]
Move baseline SchemaContext methods

AbstractSchemaContext is providing baseline implementations of
methods, which should really not be used with SchemaContext, as
they are leaking from reuse of ContainerSchemaNode. Move them
to SchemaContext as default deprecated methods.

Change-Id: I555db5b4375342ac3a58035fe45e13445d077335
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMove out SchemaContext FIXMEs 13/88713/2
Robert Varga [Thu, 26 Mar 2020 13:00:12 +0000 (14:00 +0100)]
Move out SchemaContext FIXMEs

We do not have the cycles to hunt down all places where we rely
on SchemaContext/ContainerSchemaNode relationship. Push out the
FIXMEs to 6.0.0.

Change-Id: Iafd0e46ebff9670f4b6c1d5237c7ee1433e1bb1d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove YangLocationPath FIXME 12/88712/2
Robert Varga [Thu, 26 Mar 2020 12:58:21 +0000 (13:58 +0100)]
Remove YangLocationPath FIXME

Having an UnresolvedQNameStep is useful here, let's retain it
for now.

Change-Id: I807879c367a1e0e5bf12b3bd5607a92c0f0d73e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPush out YangXPathMathMode FIXMEs 11/88711/2
Robert Varga [Thu, 26 Mar 2020 12:55:06 +0000 (13:55 +0100)]
Push out YangXPathMathMode FIXMEs

These FIXMEs need further thought, push them out.

Change-Id: If0417eba72a6279efa8d20dd0c3616dac675e6e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake YangXPathExpression.getYangVersion() non-default 10/88710/2
Robert Varga [Thu, 26 Mar 2020 12:54:02 +0000 (13:54 +0100)]
Make YangXPathExpression.getYangVersion() non-default

Implementations need to provide exact version, make sure they do.

Change-Id: If1c50a722c0d62b2f67365f61f535807d9b6c041
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPush out YangInstanceIdentifier FIXMEs 09/88709/2
Robert Varga [Thu, 26 Mar 2020 12:48:32 +0000 (13:48 +0100)]
Push out YangInstanceIdentifier FIXMEs

These ideas need to be moved out to next major release.

Change-Id: Ia6406c70623652b4fb6371da9c8155cd0878f0f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove SchemaPath FIXMEs 08/88708/2
Robert Varga [Thu, 26 Mar 2020 12:43:57 +0000 (13:43 +0100)]
Remove SchemaPath FIXMEs

We actually do not want to use SchemaPath relative/absolute classes,
as we want to get rid of SchemaPath. The use cases related to the
FIXMEs here are already covered by SchemaNodeIdentifier, which is
being used as appropriate.

Change-Id: I6257df419ab9a2fbdb2cbbf88b9593a6b01a4712
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate newDataInputWithoutValidation() for removal 07/88707/2
Robert Varga [Thu, 26 Mar 2020 12:42:46 +0000 (13:42 +0100)]
Deprecate newDataInputWithoutValidation() for removal

This is a mighty historic hack, which should no longer be used,
as it delays stream validation to some unknown future access.

Change-Id: I49d02b77bb09b059fe641e83216ae111eecdee18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove FIXME marker 06/88706/2
Robert Varga [Thu, 26 Mar 2020 12:40:10 +0000 (13:40 +0100)]
Remove FIXME marker

We really want get away from Serializable due to the constraints
and inefficiencies it brings. Remove a FIXME which would see us
proliferate Serializable.

Change-Id: I009084aaedbdad23fa5d6a9dc6f2ff22485f2b8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake SchemaNode.getPath() implementations as deprecated 04/88704/1
Robert Varga [Thu, 26 Mar 2020 12:29:49 +0000 (13:29 +0100)]
Make SchemaNode.getPath() implementations as deprecated

Implementations and other overrides could end up hiding the fact
getPath() is deprecated. Make sure all known implementations
are marked deprecated.

JIRA: YANGTOOLS-1069
Change-Id: I34c27e8b0985b89dc4eefeb5a053cf88d2624217
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd SchemaInferenceStack 98/88098/13
Robert Varga [Thu, 27 Feb 2020 13:17:42 +0000 (14:17 +0100)]
Add SchemaInferenceStack

Migrating away from use of SchemaPath requires us to introduce a
concept which can be used to transfer inference state across functional
blocks.

SchemaInferenceStack is precisely such a concept. It is inherently
attacked to an EffectiveModelContext and can be manipulated by users
to reflect traversal through EffectiveStatements. The statements can
be pushed and popped based on application decisions, but the stack
always retains information as to how we got to a particular statement.

This provides superior accuracy when compared to SchemaPath-driven
operation, which is ambiguous around groupings. It also allows
efficient transfer of this state for the purposes of further inference
-- for example to perform static analysis of a leaf-ref type.

JIRA: YANGTOOLS-1086
Change-Id: Id50a2daac0af6c5944b4bb2ef29734f7efb5315b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFixup AbstractDeclaredEffectiveStatement 94/88694/1
Robert Varga [Thu, 26 Mar 2020 09:43:27 +0000 (10:43 +0100)]
Fixup AbstractDeclaredEffectiveStatement

Nullable annotation here conflicts with the change made in
interface specification. Clean that up.

JIRA: YANGTOOLS-908
Change-Id: If1397a98d756c879eec3f7f8eed97c071113ead5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate SchemaNode.getPath() 49/86949/6
Robert Varga [Wed, 15 Jan 2020 20:52:49 +0000 (21:52 +0100)]
Deprecate SchemaNode.getPath()

SchemaNode.getPath() has the problem of not being exact enough
and affecting scaling. Deprecate it so that we can find users
and offer replacement strategies.

JIRA: YANGTOOLS-1069
Change-Id: I2587abcc3dfb0c3c1f01d9208b5b1d0c99813346
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove @Nullable annotation 88/88488/6
Robert Varga [Wed, 18 Mar 2020 13:07:21 +0000 (14:07 +0100)]
Remove @Nullable annotation

ModelStatement.argument()'s return is causing quite a bit of grief
with static analysis. Remove the annotation, as its currently unused
anyway. In future we will make sure concretizations end up
constraining <A> to @NonNull type.

JIRA: YANGTOOLS-908
Change-Id: Id1771de902866b5925d9b7e9ea0177ac676d14c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 7.0.0 68/88668/2
Robert Varga [Wed, 25 Mar 2020 08:07:33 +0000 (09:07 +0100)]
Bump odlparent to 7.0.0

Do not rely on snapshots, use the released version.

Change-Id: Ic2b15184c32691ffe443a84b488c80e625e146c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove StackedReversePathArguments.haveSize 93/88493/3
Robert Varga [Wed, 18 Mar 2020 13:38:43 +0000 (14:38 +0100)]
Remove StackedReversePathArguments.haveSize

We do not need to have a separate field here, as the size cannot
legally be here 0 -- as stacking guarantees we have at least one
parent.

Change-Id: Id319d4ef05efc1c3691b7b97b6b188cc09701547
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate JAXB API reference 53/88653/1
Robert Varga [Tue, 24 Mar 2020 16:24:45 +0000 (17:24 +0100)]
Migrate JAXB API reference

odlparent-7 is using Jakarta-sourced jaxb-api, adjust to that.

Change-Id: I6b4875f86b81d8ce74de34cceb1676f3d6c578e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSeparate out UnmodifiedRootDataTreeCandidateNode 76/88476/2
Robert Varga [Wed, 18 Mar 2020 10:39:42 +0000 (11:39 +0100)]
Separate out UnmodifiedRootDataTreeCandidateNode

In case we have an unmodified root we can freely reuse a single
object for all such DataTreeCandidates. Move the anonymous
implementation to its standalone class and expose the single object.

Change-Id: Iabc8358684c96c129e374c8dd491b0d8a29874a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove StmtContextUtils nullness handling 99/88499/6
Robert Varga [Wed, 18 Mar 2020 14:48:28 +0000 (15:48 +0100)]
Improve StmtContextUtils nullness handling

Improve null handling by using coerceParentContext() and storing
its result -- making it clear to static analysis tools that a null
cannot be coming here.

Change-Id: Iac5dc93e0e7d7dc6f41595bde972f744a2d86ec2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse coerceStatementArgument() in AbstractQNameStatementSupport 98/88498/6
Robert Varga [Wed, 18 Mar 2020 14:46:37 +0000 (15:46 +0100)]
Use coerceStatementArgument() in AbstractQNameStatementSupport

We really mean to enforce non-null here, make sure to use the proper
method to do that.

Change-Id: I8736c07c7945c5b3657d470c65440f51ec823931
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix buildType() nullness 95/88495/5
Robert Varga [Wed, 18 Mar 2020 14:22:25 +0000 (15:22 +0100)]
Fix buildType() nullness

We have a slight inconsistency here, as we are peeling buildType()
implementation, without also propagaing @NonNull. Fix that up.

Change-Id: I7b2e79f28f02bc81a8d06a101ef3e4bd34b9848b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix StackedYangInstanceIdentifier.getParent() nullness 92/88492/5
Robert Varga [Wed, 18 Mar 2020 13:32:40 +0000 (14:32 +0100)]
Fix StackedYangInstanceIdentifier.getParent() nullness

Stacked version always has a parent, as well as the argument, make
sure we reflect that in annotations.

Change-Id: If0f391920fd77bb718fdb7170b3e0792e1c28c7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRequire JDT annotations transitively 89/88489/3
Robert Varga [Wed, 18 Mar 2020 13:19:03 +0000 (14:19 +0100)]
Require JDT annotations transitively

We are using these in return values and generally in APIs, make sure
we require them transitively.

Change-Id: I78756188922fe8956d373ad98089c886e241b9e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDocument SingletonSet 87/88487/2
Robert Varga [Wed, 18 Mar 2020 13:06:33 +0000 (14:06 +0100)]
Document SingletonSet

This fixes an inappropriate @Nullable annotation and adds a bit of
javadoc.

Change-Id: I480b2d2d8bc8cdd663cbc3cbba4c0953657868f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd DataTreeCandidateInputOutput 74/88474/3
Robert Varga [Wed, 18 Mar 2020 10:27:54 +0000 (11:27 +0100)]
Add DataTreeCandidateInputOutput

DataTreeCandidate is a yangtools concept, which is commonly
serialized by users of DataTree. Make sure we support its serialization
in the binary stream -- importing the implementation from controller
as of e66759266dc43d5f58b2837aca5047b42c205e4a.

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