mdsal.git
5 years agoFix logging arguments 22/81122/1
Robert Varga [Fri, 22 Mar 2019 18:27:10 +0000 (19:27 +0100)]
Fix logging arguments

This is caught by upgraded spotbugs, we are missing returnType
argument.

Change-Id: I5513c89cd22e0c4fd739ada5a2d5e5b61b185a09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoTolerate unresolvable leafrefs in groupings 42/41142/7
Vratko Polak [Fri, 1 Jul 2016 11:21:15 +0000 (13:21 +0200)]
Tolerate unresolvable leafrefs in groupings

In case a grouping contains a relative leafref pointing outside of
the grouping subtree we cannot safely determine the target type, which
lead to an IllegalArgumentException.

In this case we need to resolve the return type to an Object, which
loses type safety, but really is the best we can do as we just do not
know in what contexts that grouping is used.

Unfortunately this requires API changes to mdsal-binding-generator-api
as we need to communicate the fact we are resolving a type definition
in the context of a grouping to TypeProvider implementations.

JIRA: MDSAL-182
Change-Id: Iaf96d133c08eb47f4bb27b6c4f3db1463b78f05e
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoChange 'type empty' mapping 49/80949/13
Robert Varga [Mon, 18 Mar 2019 13:40:29 +0000 (14:40 +0100)]
Change 'type empty' mapping

This patch changes 'type empty' leaves to map to yang.common.Empty,
aligning DOM and Binding representations and removing potential
confusion around what Boolean.FALSE means in the value.

It also eliminates the need for a dedicated codec, as this type is
handled through NOOP_CODEC.

JIRA: MDSAL-48
Change-Id: If43d710d4620cffaecc8ca7d42d1eb00c58370c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove FluentFuture from DOM RPC contracts 33/80933/9
Robert Varga [Sat, 16 Mar 2019 12:01:58 +0000 (13:01 +0100)]
Remove FluentFuture from DOM RPC contracts

FluentFuture cannot be proxied in Guava 27.0, hence we need to drop
to using ListenableFuture to efficiently shortcut invocations.

Change-Id: Ib89742760e0bbfdb6c46aa4bbf99ea35f5823c8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup RuntimeException throws 15/81015/2
Robert Varga [Tue, 19 Mar 2019 17:04:49 +0000 (18:04 +0100)]
Cleanup RuntimeException throws

We are just wrapping exceptions in these cases, switch to wrapping
with IllegalStateException to keep sonar happy.

Change-Id: I571f444b9d97dd9d9129b6e18f7e91e72b30d842
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up ClassTemplate getDefaultInstance() generation 85/80985/3
Robert Varga [Tue, 19 Mar 2019 11:30:08 +0000 (12:30 +0100)]
Speed up ClassTemplate getDefaultInstance() generation

We can skip instantiating FQCN and just compare against constants,
which results in faster dispatch.

Change-Id: I681888872db411b4f70b3b09d205540d8b607568
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up Union stringValue() generation 84/80984/3
Robert Varga [Tue, 19 Mar 2019 11:31:14 +0000 (12:31 +0100)]
Speed up Union stringValue() generation

We can compare against well-known Types, which is faster than
going through FQCN.

Change-Id: I7f6a7bd143d94be48176d9d8e1fe56bd0e6eae8e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify UnionTemplate stringValue() dispatch 83/80983/3
Robert Varga [Tue, 19 Mar 2019 11:19:41 +0000 (12:19 +0100)]
Simplify UnionTemplate stringValue() dispatch

We have a complicated if in two cases, simplify it and take
advantage of Types.BYTE_ARRAY.

Change-Id: Ib413d5f987b0dd15cf29fbc429bde68bc35c1379
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove DataContainer.getImplementedInterface() 51/80951/10
Robert Varga [Mon, 18 Mar 2019 14:11:14 +0000 (15:11 +0100)]
Remove DataContainer.getImplementedInterface()

This method conflicts with user data and has been supplanted
by implementedInterface().

This patch removes it from codebase and instantiates a test for
the conflict.

JIRA: MDSAL-395
Change-Id: I3c2f6699a0785dbc353f3118883168b0e84407b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGenerate implementedInterface 94/77894/40
Robert Varga [Fri, 23 Nov 2018 18:48:03 +0000 (19:48 +0100)]
Generate implementedInterface

getImplementedInterface() is trampling on getter namespace, making
it possible to clash with a user-supplied model. It also is not properly
overridden in generated code.

Fix both these issues by introducing DataContainer.implementedInterface()
and overriding it as needed wither with a narrower specification
(groupings) or a default implementation (other interfaces).

JIRA: MDSAL-396
Change-Id: I902350f0979067a9e035770e683ab18e966deb7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove DOMMountPointServiceImpl.registerMountPoint() 86/80186/4
Jakub Morvay [Thu, 7 Feb 2019 10:35:22 +0000 (11:35 +0100)]
Remove DOMMountPointServiceImpl.registerMountPoint()

This method is a leak and was deprecated in 3.0.x, remove it now in 4.0.0.

Change-Id: Ieb7c0d81872851e68dc231b5be653e782c7ed9c4
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoImplement EthertypeBuilder 29/80929/7
Robert Varga [Sat, 16 Mar 2019 11:03:00 +0000 (12:03 +0100)]
Implement EthertypeBuilder

This implements EthertypeBuilder in an efficient way, using
pre-built known ethertypes.

It also defines {compare,equal,hash}Value, methods which perform
semantic operations, treating number-based and enumeration-based
Ethertypes equally.

Change-Id: I394f65a17fa84c06a63bc598c947d274d6dd6413
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse E$$ to capture augmentation type 50/80950/2
Robert Varga [Mon, 18 Mar 2019 13:55:43 +0000 (14:55 +0100)]
Use E$$ to capture augmentation type

'E' is a valid generated identifier, which can lead to conflicts
when generating augmentable implementations.

Change-Id: I9d69d06e18301eff788c101e389a6d0b5365ad38
JIRA: MDSAL-425
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix check path contention when create tree producers 19/76919/18
han [Fri, 12 Oct 2018 03:16:19 +0000 (11:16 +0800)]
Fix check path contention when create tree producers

- It's not allowed to create producers with their subtrees conflicts.
  Add a map to store producers aim to do this check more simply than
  to travel 'DOMDataTreePrefixTable'.
  It's assumed there're less producers in th map that we could accept
  to do 'for' operation.

  JIRA: MDSAL-397
Change-Id: I105291402f21b530f54873307316f0f0c5640f6b
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoRemove implied @ThreadSafe annotations 32/80932/3
Robert Varga [Sat, 16 Mar 2019 12:00:22 +0000 (13:00 +0100)]
Remove implied @ThreadSafe annotations

Immutable interface contract implies thread safety, there is no
need for these annotations.

Change-Id: I51acabd6eca13690b67a3551ae7180510a5191b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix javadoc HTML5 compliance 31/80931/2
Robert Varga [Sat, 16 Mar 2019 11:57:58 +0000 (12:57 +0100)]
Fix javadoc HTML5 compliance

This fixes up javadocs so that they are HTML5-compliant.

Change-Id: Ie62191a3235903ecba5be46a5423b878afa67553
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRevert "Fix aggregator pom name" 27/80927/1
Robert Varga [Sat, 16 Mar 2019 10:12:17 +0000 (11:12 +0100)]
Revert "Fix aggregator pom name"

This reverts commit 0b318674e2b6f8bc9927960ee0577824976cacee,
as it breaks sonar reports.

Change-Id: I5d85dbb9d8ff84b200604959e060c7169c31e488
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove binding spec2 13/80913/1
Robert Varga [Fri, 15 Mar 2019 23:59:32 +0000 (00:59 +0100)]
Remove binding spec2

Binding spec v2 is rather incompatible and we have decided to
not make a jump to it, as it is not really feasible. Rather than
that we will backport its fixes to binding v1 in a gradual way.

Remove all binding-v2 artifacts.

Change-Id: Ic58f13372cfe6cbc6f5088e1e507acac14c11c19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCorrect docs declaration 12/80912/1
Robert Varga [Fri, 15 Mar 2019 23:57:55 +0000 (00:57 +0100)]
Correct docs declaration

We should not be declaring yangtools-docs, but rather mdsal-docs.

Change-Id: I1e47f3e8d6154ac29fc7d78da12e96dd07e831a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump version for 4.0.0-SNAPSHOT 11/80911/1
Robert Varga [Fri, 15 Mar 2019 23:45:03 +0000 (00:45 +0100)]
Bump version for 4.0.0-SNAPSHOT

This updates snapshot artifacts for 4.0.0 release train.

Change-Id: I3900cd07963b927b34ecdd60668f47c4a3c3c85b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RFC8519 models 10/80910/4
Robert Varga [Wed, 13 Mar 2019 12:29:06 +0000 (13:29 +0100)]
Add RFC8519 models

This adds RFC8519 ietf-access-control-list and ietf-packet-fields
models, which are replacing previous instantiation of these models.

Change-Id: I984db5e2fc13c4a4e0b12b3afe4141cf73c1d6d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove use of deprecated constructors 09/80909/2
Robert Varga [Fri, 15 Mar 2019 19:07:06 +0000 (20:07 +0100)]
Remove use of deprecated constructors

Java 11 deprecates most of these constructurs, so let's get rid
of them.

Change-Id: I67c03370c4e8440608e0cece182d87c7ea923258
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix logging placeholders 06/80906/3
Robert Varga [Fri, 15 Mar 2019 18:34:00 +0000 (19:34 +0100)]
Fix logging placeholders

Upgraded SpotBugs is finding these, fix them up.

Change-Id: I6209c661ccdf17d886d8c776d96fe6b6a32abc1b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix odl-mdsal-model-rfc8349 definition 24/80824/1
Robert Varga [Wed, 13 Mar 2019 12:40:22 +0000 (13:40 +0100)]
Fix odl-mdsal-model-rfc8349 definition

This feature should be polling in rfc8344, rfc8343 and rfc6991.
Due to transitive dependencies, it is enough to pull rfc8344.

Change-Id: I1098dba897dc4be27d062925799c5be3e4432117
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RFC8530 Logical Network Elements 26/80726/5
Robert Varga [Thu, 7 Mar 2019 15:24:32 +0000 (16:24 +0100)]
Add RFC8530 Logical Network Elements

This adds packaging for RFC8530 model, so that it can be reused
by downstreams.

Change-Id: I863951b0caed784f5d7d6c3f5ce4d562d8755b72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RFC8529 Network Instances 25/80725/4
Robert Varga [Thu, 7 Mar 2019 15:10:16 +0000 (16:10 +0100)]
Add RFC8529 Network Instances

This adds packaging for RFC8529 model, so that it can be reused
by downstreams.

Change-Id: I0e6cbf9b1c45122d75b639b4be9a329cedb2a252
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RFC8528 Schema Mount model 24/80724/3
Robert Varga [Thu, 7 Mar 2019 15:03:24 +0000 (16:03 +0100)]
Add RFC8528 Schema Mount model

This adds packaging for RFC8528 model, so that it can be reused
by downstreams.

JIRA: MDSAL-424
Change-Id: Ia6ec9ffd349cd6afa2629b9fa1eb9096d263aa39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake Enumeration extend TypeObject 33/79933/5
Jie Han [Sat, 26 Jan 2019 03:04:33 +0000 (11:04 +0800)]
Make Enumeration extend TypeObject

- By now we can use TypeObject for leaf type objects

JIRA: MDSAL-407
Change-Id: Ifc7889b154e5e8bcdcbc4885affa9d3fa88facc2
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoMark typedef types as TypeObject 92/79892/6
Jie Han [Fri, 25 Jan 2019 07:29:04 +0000 (15:29 +0800)]
Mark typedef types as TypeObject

Make binding class of typedef implement TypeObject. In order to not
break compatibility, make sure we disregard marker interfaces when
computing serialVersionUID.

JIRA: MDSAL-406
Change-Id: I8e8bf31d3b3c43a2c843e7dd9914def12c52fee3
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup mdsal-trace-cli package 31/80331/1
Robert Varga [Thu, 14 Feb 2019 09:55:04 +0000 (10:55 +0100)]
Cleanup mdsal-trace-cli package

This is not part of the public contract and it encroaches on
controller's namespace. Fix that up.

Change-Id: Iae74934039ebc684ac29ef5420c4e4b2ea2d99a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd a category for org.opendaylight.mdsal.model.ietf.util 30/80330/1
Robert Varga [Thu, 14 Feb 2019 09:52:45 +0000 (10:52 +0100)]
Add a category for org.opendaylight.mdsal.model.ietf.util

Provide a nice description in the javadocs for the package.

Change-Id: Ic699fe849d4fdd6d7e6181a7c480d481a24cd7b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse Collections.emptyList and Collections.emptySet 89/80289/1
Stephen Kitt [Tue, 12 Feb 2019 15:41:53 +0000 (16:41 +0100)]
Use Collections.emptyList and Collections.emptySet

... instead of the non-generic constants.

Change-Id: I8540db4c2d52185ed0de65eb8b45b75f75cc3f91
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoUse java.util.Objects.equals 88/80288/1
Stephen Kitt [Tue, 12 Feb 2019 15:39:24 +0000 (16:39 +0100)]
Use java.util.Objects.equals

... instead of com.google.common.base.Objects.equal.

Change-Id: Id4252306c443ce140e261c353dfecd601bcad84c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoUse HashMap and HashSet constructors 87/80287/1
Stephen Kitt [Tue, 12 Feb 2019 15:37:56 +0000 (16:37 +0100)]
Use HashMap and HashSet constructors

... instead of Maps.newHashMap and Sets.newHashSet.

Change-Id: Ie6c04a4fc546401b41943c481335e2cc320f7edd
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoSwitch to java.util.Base64 86/80286/1
Stephen Kitt [Tue, 12 Feb 2019 14:23:30 +0000 (15:23 +0100)]
Switch to java.util.Base64

Change-Id: Ib944fdd09543d423478267d0ea8a386ae3efe02d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoSwitch to Objects.requireNonNull 79/80279/1
Stephen Kitt [Tue, 12 Feb 2019 11:04:48 +0000 (12:04 +0100)]
Switch to Objects.requireNonNull

... instead of Guava’s Preconditions.checkNotNull.

Change-Id: If7979ac0071e8c1d1af2d7913c6df791942825ab
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoDo not generate CheckReturnValue annotations 17/80217/4
Robert Varga [Thu, 7 Feb 2019 18:52:41 +0000 (19:52 +0100)]
Do not generate CheckReturnValue annotations

Use of javax.annotation is really hurting our migration to Java 11,
just do not generate it all over the place.

JIRA: MDSAL-372
Change-Id: I81aa4d8b62b12ea0ea503b5d002e744a31855aea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd mark interface 90/79890/5
Jie Han [Fri, 25 Jan 2019 03:52:34 +0000 (11:52 +0800)]
Add mark interface

- Add TypeObject for derived types only
- Add base BindingObject for all binding types

JIRA: MDSAL-406
Change-Id: I93ac1bea70f61a9ed05dc35951f024f08dcf6b83
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoAccount for reported UNMODIFIED nodes 69/80269/1
Robert Varga [Mon, 11 Feb 2019 16:25:47 +0000 (17:25 +0100)]
Account for reported UNMODIFIED nodes

DataObjectModification has no way of expressing UNMODIFIED nodes,
but they can (and are) reported from DataTreeCandidateNode, hence
we end up reporting IllegalStateException when the user tries to
look at those nodes.

Make sure we take the node under consideration and do not report
unmodified children, hence preventing the ISE from happening.

JIRA: MDSAL-422
Change-Id: I34d36ae083c5ce3ad793eb584236f175f7a3a906
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump java-diff-utils 12/80212/2
Stephen Kitt [Thu, 7 Feb 2019 17:25:27 +0000 (18:25 +0100)]
Bump java-diff-utils

This upgrades java-diff-utils to version 4.0, with its new group id,
bringing better Java 9+ support and fixing a number of licensing
issues.

Change-Id: I4272f4d721dbd0af335115cc3bb2be196329ca11
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoFix AbstractBaseDataBrokerTest.assertCommit() 65/80165/2
Robert Varga [Tue, 5 Feb 2019 21:50:54 +0000 (22:50 +0100)]
Fix AbstractBaseDataBrokerTest.assertCommit()

This method should reflect whatever commit() is returning, but
unfortunately it was left out during conversion.

Change-Id: I7e7389d0a7f8fbd94af2ee07ce089f72f4855a74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGenerated javadoc does not separate multi-line description 15/80015/2
Jie Han [Wed, 30 Jan 2019 02:26:00 +0000 (10:26 +0800)]
Generated javadoc does not separate multi-line description

- replace any of "\n\t" with " " and then replace
  multiple " " to a single " ".

JIRA: MDSAL-416

Change-Id: I1f29f7da9f574e65a8ccf169e29883c9d1f47c26
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoUpdate junit link 57/79957/3
Robert Varga [Mon, 28 Jan 2019 16:35:08 +0000 (17:35 +0100)]
Update junit link

javadoc.io breaks with JDK11, update the link.

JIRA: MDSAL-419
Change-Id: I9b0fdbe0d0dc888f4b5de8e25a298fb7424e5345
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agominor: fix wrong Logger in InMemoryDOMDataStoreFactory 34/79934/1
Michael Vorburger [Sat, 26 Jan 2019 06:01:55 +0000 (07:01 +0100)]
minor: fix wrong Logger in InMemoryDOMDataStoreFactory

Change-Id: I20257192bc2885a2500025bcbdf18e8fa0c8d0c6
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoUpdate javadocs link 27/79827/1
Robert Varga [Tue, 22 Jan 2019 16:08:09 +0000 (17:08 +0100)]
Update javadocs link

We have moved javadocs to a different artifact, update the link.

Change-Id: I9f81681f6b2118712b1c4cebbe0a6de5fafed194
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to 3.0.7-SNAPSHOT 23/79823/1
Robert Varga [Tue, 22 Jan 2019 15:12:58 +0000 (16:12 +0100)]
Bump to 3.0.7-SNAPSHOT

This starts the next release development.

Change-Id: I57a90dbf6d5961ea0c2d1c3bb5af5dda985132c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix inability to promote 15/79815/1
Robert Varga [Tue, 22 Jan 2019 09:07:03 +0000 (10:07 +0100)]
Fix inability to promote

mdsal-docs not having the main artifact causes the repository
fail to promote. Work this around by packaging guides into a jar
rather than as a separate classifier.

Change-Id: I3c228e425da04b645f0a1a6dbd3e58cffe6e9f6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRevert "Add BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier" 03/79803/2
Robert Varga [Tue, 22 Jan 2019 01:58:17 +0000 (02:58 +0100)]
Revert "Add BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier"

This reverts commit 137bd301e01ecec44fa47dfbc69df664ea014c5e.

Blueprint cannot handle default methods, hence we need to revert
this, unfortunately.

Change-Id: I67917f2e5cdb70ebe45f76cae347bde209841e17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd mdsal-docs artifact 01/79801/3
Robert Varga [Mon, 21 Jan 2019 21:18:12 +0000 (22:18 +0100)]
Add mdsal-docs artifact

Rather than doing javadoc:aggregate, use the docs directory to
prepare documentation, which includes sources as well as javadocs.

This cuts down the build time in half while providing a better
javadoc result due to our ability to heavily customize.

Change-Id: If39191f179265240e7a5d3700fcea32e10897220
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump versions to 3.0.6-SNAPSHOT 76/79776/1
Robert Varga [Mon, 21 Jan 2019 01:24:22 +0000 (02:24 +0100)]
Bump versions to 3.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I1012c62ad20cf9db03b8fa121db16377669e43d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.8 40/79740/2
Robert Varga [Sat, 19 Jan 2019 20:16:54 +0000 (21:16 +0100)]
Bump yangtools to 2.1.8

This align with odlparent-4.0.9.

Change-Id: I0b8f5c3502a78ae7bf3b6c96631e84d9c1303183
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix aggregator pom name 20/79720/1
Robert Varga [Fri, 18 Jan 2019 21:58:48 +0000 (22:58 +0100)]
Fix aggregator pom name

This has a typo in it, fix it.

Change-Id: Idf979465e4ffe9814415147367db6e8a9b4a47fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.9 60/79660/1
Stephen Kitt [Fri, 18 Jan 2019 15:26:59 +0000 (16:26 +0100)]
Bump to odlparent 4.0.9

Change-Id: Iefa6c11fe412f814a3e8e15ea709c6f6aa795ef4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAdd BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier 23/79623/1
Robert Varga [Thu, 17 Jan 2019 16:18:21 +0000 (17:18 +0100)]
Add BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier

In application-level adapter, which are bound to particular models,
the nullable annotation gets in the way, as it flags a potential
error, which needs to be expensively masked.

Introduce a coerceFromYangInstanceIdentifier() method, which includes
the masking, leaving application code unburdened with this detail.

Change-Id: I0b6e052b6b9be7c42538ab25924fd47b0421b274
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCorrect EOS adapter error message 22/79622/2
Robert Varga [Thu, 17 Jan 2019 15:55:39 +0000 (16:55 +0100)]
Correct EOS adapter error message

The catch block covers multiple error causes and provides a misleading
message when the listener (i.e. user code) fails.

Refactor the method to cleanly separate failure causes.

Change-Id: I21b9c846425b35684951c6f8d3c011a50d3308d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agofix NPE in odl-mdsal-trace 23/79523/1
Michael Vorburger [Fri, 14 Dec 2018 15:37:16 +0000 (16:37 +0100)]
fix NPE in odl-mdsal-trace

It (probably) broke back in
Commit a6286576cf76bce93009c58b88ba1e949ef717af
Change-Id: Id82a79e8e430665f6fb5433ed7bab858044eacbe.

This NPE only occurs if mdsaltrace has non-empty write-watches
(as it does in the initial default mdsaltrace_config.xml).

The following commit adds a non-regression test for this.

Caused by: java.lang.NullPointerException
  at org.opendaylight.mdsal.binding.dom.codec.impl.BindingCodecContext.getCodecContextNode(BindingCodecContext.java:152)
  at org.opendaylight.mdsal.binding.dom.codec.impl.InstanceIdentifierCodec.deserialize(InstanceIdentifierCodec.java:36)
  at org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry.fromYangInstanceIdentifier(BindingNormalizedNodeCodecRegistry.java:101)
  at org.opendaylight.mdsal.binding.dom.adapter.BindingToNormalizedNodeCodec.fromYangInstanceIdentifier(BindingToNormalizedNodeCodec.java:215)
  at Proxyabf4ea17_f2e5_4773_bd89_e4f8393036df.fromYangInstanceIdentifier(Unknown Source)
  at Proxy1038cd39_b88e_4023_8cb1_af39f6d6feb2.fromYangInstanceIdentifier(Unknown Source)
  at org.opendaylight.controller.md.sal.trace.dom.impl.TracingBroker.toPathString(TracingBroker.java:270)
  at org.opendaylight.controller.md.sal.trace.dom.impl.TracingBroker.toPathString(TracingBroker.java:264)
  at org.opendaylight.controller.md.sal.trace.dom.impl.TracingBroker$Watch.eventIsOfInterest(TracingBroker.java:167)
  at org.opendaylight.controller.md.sal.trace.dom.impl.TracingBroker.isWriteWatched(TracingBroker.java:248)
  at org.opendaylight.controller.md.sal.trace.dom.impl.AbstractTracingWriteTransaction.recordOp(AbstractTracingWriteTransaction.java:37)
  at org.opendaylight.controller.md.sal.trace.dom.impl.AbstractTracingWriteTransaction.<init>(AbstractTracingWriteTransaction.java:32)
  at org.opendaylight.controller.md.sal.trace.dom.impl.TracingWriteTransaction.<init>(TracingWriteTransaction.java:24)

JIRA: CONTROLLER-1877
Change-Id: Ia9fbf69bc1c3553e929a045146a3610bce72cd96
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd javadoc badge 10/79510/1
Robert Varga [Mon, 14 Jan 2019 11:02:53 +0000 (12:02 +0100)]
Add javadoc badge

Now that our aggregate javadocs are in central, add a javadoc.io
badge pointing to them.

Change-Id: I2df704706baff60079edb69a9c188c923e9ee307
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd feature descriptions 95/79495/1
Robert Varga [Sat, 12 Jan 2019 08:46:19 +0000 (09:46 +0100)]
Add feature descriptions

odlparent-lite is giving use a rather verbose and non-descript
feature description. Add proper short descriptions, so that users
can see something useful.

Change-Id: I2c9c29dbc6dde579bd4f50f0da0b1b2b814933b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoStart mdsal-3.0.5 development 20/79420/1
Robert Varga [Thu, 10 Jan 2019 15:21:34 +0000 (16:21 +0100)]
Start mdsal-3.0.5 development

This bumps versions to .5-SNAPSHOT, opening the next development
iteration.

Change-Id: I082400c698c78eaa525f8addaac2ecbdc90c4874
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.7 04/79404/1
Robert Varga [Thu, 10 Jan 2019 10:18:44 +0000 (11:18 +0100)]
Bump yangtools to 2.1.7

This realigns odlparent/yangtools versions and brings in some
minor improvements.

Change-Id: If46369a9be7976f905dd4c3ebf26e984328c489f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRevert "Simplify ClassLoadingStrategy implementations" 01/79401/2
Robert Varga [Thu, 10 Jan 2019 10:06:25 +0000 (11:06 +0100)]
Revert "Simplify ClassLoadingStrategy implementations"

This reverts commit 75181ffcf7c147a22330a8817af89aecdaf8149c,
which breaks blueprint, as it does not mix with default methods.

Change-Id: Ic53ddc49ec60430b92124e52e3a670da8ff4f5a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFixup version bump 02/79402/1
Robert Varga [Thu, 10 Jan 2019 10:10:09 +0000 (11:10 +0100)]
Fixup version bump

I again forgot to perform a complete version bump, this fixes it
up so we have proper .4-SNAPSHOT versions.

Change-Id: I750b41c188cf00b164997fdd928c5db906d6bb63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.8 54/79354/2
Stephen Kitt [Wed, 9 Jan 2019 14:34:22 +0000 (15:34 +0100)]
Bump to odlparent 4.0.8

Change-Id: I930ea20715ed91acf2e8ebb2e9b253bacff71eda
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMove blueprint code into place 16/79316/5
Robert Varga [Tue, 8 Jan 2019 15:35:55 +0000 (16:35 +0100)]
Move blueprint code into place

This moves the contents of opendaylight/blueprint into a new
component, mdsal-blueprint-binding. While the structure is created,
the component is not yet plugged into the build system, which will
be done in subsequent patches.

JIRA: MDSAL-413
Change-Id: I1c11f2947cc6e5061e4de1ff8b4a4ca803b97c36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove redundant type declarations 79/76879/6
Stephen Kitt [Thu, 11 Oct 2018 10:47:47 +0000 (12:47 +0200)]
Remove redundant type declarations

Type inference improved since we wrote this code, hence we can
ditch the explicit types.

Change-Id: I44ae2c841820b6e8e4b05d06b45d9123c7b6db70
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAttach aggragate javadocs to aggregator 51/79051/4
Robert Varga [Wed, 26 Dec 2018 00:12:34 +0000 (01:12 +0100)]
Attach aggragate javadocs to aggregator

This allows us to point users to our aggregated javadocs, hence
they do not fish for them. This means, though, that we have to
install the aggregator.

Change-Id: Ic5c190a612dd7a679f3b98114652dc3af670b487
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove mdsal-trace into its place 69/75569/5
Robert Varga [Tue, 8 Jan 2019 11:51:33 +0000 (12:51 +0100)]
Move mdsal-trace into its place

This is code incoming from the controller, we need to integrate it
into mdsal structure. This patch performs the preliminary move out
of opendaylight/md-sal directory.

While this code is being built, it is not part of the feature
repository yet, so as not to interfere with controller's
odl-mdsal-trace feature.

JIRA: MDSAL-412
Change-Id: I04cf3dcda5d990f5b1e45a3b3ecf15978a0db958
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse the new constructor of 'Disruptor' instead of a deperecated one 89/79089/5
Jie Han [Sun, 30 Dec 2018 07:13:18 +0000 (15:13 +0800)]
Use the new constructor of 'Disruptor' instead of a deperecated one

Rather than passing a pre-configured ThreadPool, we use a ThreadFactory
to instantiatiate the Disruptor.

Since we require an executor to dispatch subscription listeners,
create a separate thread pool to execute them on.

Change-Id: I75605a5deadc477bc91f275b5fd04d7907fbd631
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.7 82/79082/3
Robert Varga [Thu, 27 Dec 2018 15:57:47 +0000 (16:57 +0100)]
Bump odlparent to 4.0.7

This fixes Java11 SFT compatiblity.

Change-Id: I3645e3f1284962e4670b4b71ed8edb72ad81e22f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify ClassLoadingStrategy implementations 85/78985/6
Robert Varga [Sat, 22 Dec 2018 01:19:15 +0000 (02:19 +0100)]
Simplify ClassLoadingStrategy implementations

loadClass(Type) has only one implementation, which defers to
loadClass(String). Promote that impleentation to default, simplifying
other potential implementations.

Change-Id: Idef5da25e10490fce2174dee7a6c031f71cc741c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove README.adoc to README.md 29/79029/1
Robert Varga [Mon, 24 Dec 2018 18:21:05 +0000 (19:21 +0100)]
Move README.adoc to README.md

Also add badges.

Change-Id: I9158dd7c391990c7074f642814498a19440e07f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump version to .4-SNAPSHOT 09/79009/1
Robert Varga [Sun, 23 Dec 2018 10:23:52 +0000 (11:23 +0100)]
Bump version to .4-SNAPSHOT

This starts 3.0.4-SNAPSHOT development.

Change-Id: Ifb0a03e6ad9d648ac5e9eebce19d3844b25b25ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.6 53/78953/3
Robert Varga [Fri, 21 Dec 2018 16:07:17 +0000 (17:07 +0100)]
Bump yangtools to 2.1.6

This bumps the yangtools version to align it with odlparent-4.0.5.

Change-Id: I639889f1247dba53c318d3ccd33e2cb82a68be86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix GroupingDefinitionDependencySort javadoc 00/79000/1
Robert Varga [Sat, 22 Dec 2018 19:42:44 +0000 (20:42 +0100)]
Fix GroupingDefinitionDependencySort javadoc

A minor cleanup of javadocs.

Change-Id: I35aea055317de2a44ca2d60fef585ad4df3dbf6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRefactor ModuleInfoBackedContext a bit 96/78996/3
Robert Varga [Sat, 22 Dec 2018 15:05:29 +0000 (16:05 +0100)]
Refactor ModuleInfoBackedContext a bit

The try/catch block is overly broad, reduce it to clarify that
a duplicate package is ignored without further actions.

Change-Id: I38a4f1d8f173b593ddb6c83d27b025cada926931
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix a javadoc typo 95/78995/3
Robert Varga [Sat, 22 Dec 2018 15:11:54 +0000 (16:11 +0100)]
Fix a javadoc typo

Simple typo in javadoc, fix it.

Change-Id: I37cdd22d0a73630f6d45072b61efba4d43061079
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to yangtools-2.1.6-SNAPSHOT 97/78997/1
Robert Varga [Sat, 22 Dec 2018 18:24:34 +0000 (19:24 +0100)]
Bump to yangtools-2.1.6-SNAPSHOT

This is for early integration before the regular release is promoted.

Change-Id: I33e64b02e385d5e302467242579f994e491e305e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse commons-lang3 from odlparent 93/78993/1
Robert Varga [Sat, 22 Dec 2018 17:28:14 +0000 (18:28 +0100)]
Use commons-lang3 from odlparent

odlparent-4.0.5 ships various third-parties wrapped in features,
use odl-apache-commons-lang3 instead of packaging it ourselves.

Change-Id: Idaa9f249e50b5e2aaa2f2562111a3e635b334031
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse disruptor from odlparent 92/78992/1
Robert Varga [Sat, 22 Dec 2018 17:22:50 +0000 (18:22 +0100)]
Use disruptor from odlparent

odlparent provides lmax-disruptor packaging, use that instead of
packaging it ourselves.

Change-Id: I38ad75b50c7613b674e4aa65c80192e85a7fc40c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove commons-lang3 dependency 91/78991/1
Robert Varga [Sat, 22 Dec 2018 17:22:11 +0000 (18:22 +0100)]
Remove commons-lang3 dependency

mdsal-binding-dom-codec does not need this dependency, remove it.

Change-Id: I464594cf64599c1d15578c40c0d54252e006384f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.5 56/78956/2
Stephen Kitt [Fri, 21 Dec 2018 16:40:24 +0000 (17:40 +0100)]
Bump to odlparent 4.0.5

Change-Id: I68edc89602d424de7b61e24cf42db674c8364b15
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoDowngrade mdsal-binding-generator-impl dependencies 72/78972/2
Robert Varga [Fri, 21 Dec 2018 21:12:52 +0000 (22:12 +0100)]
Downgrade mdsal-binding-generator-impl dependencies

mdsal-binding-generator-impl does not need yang-data-impl,
only yang-data-api. Downgrade the dependency.

Change-Id: I8ac5c20f43237cb6a811a4556752f236e6c61217
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFixup (DOM)DataTreeChangeListener a bit 62/78662/5
Jie Han [Wed, 12 Dec 2018 01:09:37 +0000 (09:09 +0800)]
Fixup (DOM)DataTreeChangeListener a bit

According to comments of
https://git.opendaylight.org/gerrit/#/c/77070/

 - replace 'onInitialData' with 'onEmptyInitialData' in
    (DOM)DataTreeChangeListener
 - fixup javadoc description

Change-Id: I50a1b903c365157265512eefce9811cbdd3d6350
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBump to odlparent 4.0.4 06/78906/2
Stephen Kitt [Fri, 21 Dec 2018 08:54:06 +0000 (09:54 +0100)]
Bump to odlparent 4.0.4

Change-Id: I6c3bf062614b6817e1a2bfe7e7f7e94c44683852
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAllow Binding/DOM/Binding shortcuts to be disabled 16/78816/4
Robert Varga [Sat, 15 Dec 2018 13:14:33 +0000 (14:14 +0100)]
Allow Binding/DOM/Binding shortcuts to be disabled

This adds a property-driven knob, which allows the various shortcuts
we take when crossing binding-dom-adapter to be completely disabled.

Using the knob is useful for testing and making sure applications
correctly follow the YANG model they are written against.

Change-Id: I9836304fe7878b80c769b88914300fbcf3fe08b5
JIRA: MDSAL-409
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMass-migrate fields to Immutable collections 08/78808/1
Robert Varga [Fri, 14 Dec 2018 20:09:26 +0000 (21:09 +0100)]
Mass-migrate fields to Immutable collections

This follows errorprone/Google recommendation of keeping fields
Immutable{List,Map,Set}. It has the tiny advantage of resulting
in invokevirtual vs. invokeinterface.

Change-Id: I53d55c1909d93021370d6f411284a89cab62b4f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoImprove conflicting error message 96/78796/1
Robert Varga [Fri, 14 Dec 2018 12:15:58 +0000 (13:15 +0100)]
Improve conflicting error message

In the unlikely event we conflict on a constant, it is nice to know
what name it has.

Change-Id: Ie775779c350e6621917d0212978f6aa2f28c32f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup BaseYangTypes 95/78795/1
Robert Varga [Fri, 14 Dec 2018 12:01:49 +0000 (13:01 +0100)]
Cleanup BaseYangTypes

We can make direct references to constants exposed from Types,
as well as eliminate a static initializer by exploiting fluent
nature of ImmutableMap.builder();

Change-Id: If045e15375bc7c35c2f7e72dafde59a7baa07317
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd CodeHelpers.throwInvalidRange() specializations 68/78768/2
Robert Varga [Thu, 13 Dec 2018 19:07:37 +0000 (20:07 +0100)]
Add CodeHelpers.throwInvalidRange() specializations

Range-checking code can (and does) emit checks based on primitive
types, hence it is forcing a boxing operation.

Provide overloaded methods to allow generated code to bind to both
int- and long-based specializations, resulting is less byte code
being generated.

Change-Id: If6d3cc04c3f7d3d3d5fb3ad3a10f3c3d8f813654
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.5 40/78640/1
Robert Varga [Tue, 11 Dec 2018 09:33:13 +0000 (10:33 +0100)]
Bump yangtools to 2.1.5

Brings in the latest fixes and improvements.

Change-Id: I5a9aa33355aa8a21b857411d9945c696438ec0ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not import javax.annotation 33/78333/4
Robert Varga [Sat, 1 Dec 2018 22:11:20 +0000 (23:11 +0100)]
Do not import javax.annotation

javax.annotation.RegEx has retention=runtime, hence we need to
suppress javax.annotation import until we migrate to something
else. Also fix binding2, which uses other JSR305 annotations.

Change-Id: I506fe8d11c0d3ec683cc09c4c9b8f5506c809163
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDisable binding2 javadoc under Java 11 34/78334/4
Robert Varga [Sat, 1 Dec 2018 22:20:52 +0000 (23:20 +0100)]
Disable binding2 javadoc under Java 11

javadoc fails to find generated .txt package, leading to a failure
to resolve imports. Sacrifice javadocs to let Java 11 through.

Change-Id: Ifd6fa576f38d08d1d12ffc7aeeced1762a021beb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSuppress RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 32/78332/2
Robert Varga [Sat, 1 Dec 2018 22:13:02 +0000 (23:13 +0100)]
Suppress RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

spotbugs does not grok Java 11 try-with-resources desugaring,
forcing us to suppress this warning.

Change-Id: Ia840cdd03932ae543fe66931f55d6b3c1b2d4697
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out single-key Identifiable handling 10/78110/13
Robert Varga [Sun, 25 Nov 2018 15:01:34 +0000 (16:01 +0100)]
Separate out single-key Identifiable handling

We can further optimize IdentifiableItemCodec by separating
out the common case of a single-key from multiple-keys.

This allows us to specialize ImmutableMapTemplates we use for
the two cases, more efficiently binding to
NodeIdentifierWithPredicates constructor.

Furthermore we can specialize key constructor invocation such
that we directly invoke the constructor for single-key identifiers,
without the need to iterate and allocate arrays.

JIRA: MDSAL-387
Change-Id: I2fc26dc7285bfb3fe829b8b0efd9937daf6fbc8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump versions to 3.0.3-SNAPSHOT 05/78205/2
Robert Varga [Tue, 27 Nov 2018 11:14:49 +0000 (12:14 +0100)]
Bump versions to 3.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Id51d991b957c1fe58ac64f6c64384baa7bd6fcc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdjust minor version to 1.0.2-SNAPSHOT 02/78202/2
Robert Varga [Tue, 27 Nov 2018 10:57:03 +0000 (11:57 +0100)]
Adjust minor version to 1.0.2-SNAPSHOT

This makes it a lot easier to bump versions.

Change-Id: Ib2e3870f9b1868869907998e382147b89a27f828
JIRA: MDSAL-381
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix up release old producers to avoid memory leak 01/76501/22
han [Sun, 30 Sep 2018 08:49:54 +0000 (16:49 +0800)]
Fix up release old producers to avoid memory leak

- It should close all correlative old 'InMemoryDOMDataTreeShardProducer'
  when close a 'ShardedDOMDataTreeProducer', or a memory leak happens
  for repeatly creating and closing the same producer as well as in the
  case of attach/detach subshards.

JIRA: MDSAL-386
Change-Id: I9c6ad6b63de4dfc7b75a315fce23a5da3be9d06d
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix ClassTemplate.hashCode() alignment 98/78198/2
Robert Varga [Tue, 27 Nov 2018 09:39:09 +0000 (10:39 +0100)]
Fix ClassTemplate.hashCode() alignment

We missed four spaces, making the output look ugly. Fix that.

Change-Id: I44cf863a9478db8d1ab4f90c4cf2d766d576f554
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoTeach MethodSignature about default methods 02/78102/9
Robert Varga [Fri, 23 Nov 2018 18:30:11 +0000 (19:30 +0100)]
Teach MethodSignature about default methods

MethodSignature dates back to Java 7 days and has no notion of
interface-default methods. Retrofit the support, as it may come
handy when dealing with various aspects of codegen.

Also propagate the knowledge of them into java-api-generator, so
that we have a cleaner nonnull method generation and new default
methods do not break Builder{Generator,Template} assumptions.

JIRA: MDSAL-18
JIRA: MDSAL-396
Change-Id: I12ea42d096ee50ae61f908e9f9347c45883f66b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize IdentifiableItemCodec 73/78073/8
Robert Varga [Fri, 23 Nov 2018 00:30:08 +0000 (01:30 +0100)]
Optimize IdentifiableItemCodec

ImmutableMapTemplate allows us to instantiate space-efficient
ImmutableOffsetMaps very quickly, because we know exactly what
keySet() we are going to use, including our preferred ordering.

Use this class to instantiate keyValueContexts and also create
NodeIdentifierWithPredicates.

JIRA: YANGTOOLS-917
Change-Id: I087083fe4e1914bb5d8e58b9e378ebda9e070793
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>