mdsal.git
7 weeks agoAdd RTD documentation 33/110533/1
Robert Varga [Thu, 7 Mar 2024 13:32:15 +0000 (14:32 +0100)]
Add RTD documentation

RTD build is failing due to us missing configuration. Fix that.

Change-Id: Ia26b09bd8e5c9865161b5975928e15b699b366b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoBump byte-buddy to 1.14.12 67/110467/1
Robert Varga [Mon, 4 Mar 2024 13:45:51 +0000 (14:45 +0100)]
Bump byte-buddy to 1.14.12

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.12

Change-Id: I4f31638b4094d7e43226d0a20122b7d22ef80fed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not generate prime when not needed 18/110318/1
Robert Varga [Fri, 23 Feb 2024 22:30:47 +0000 (23:30 +0100)]
Do not generate prime when not needed

In case we do not have any properties we end up emitting a local
variable which we'll never use -- generating a compiler warning.

Improve InterfaceTemplate to check for this condition and emit the
prime only if there are actually at least one property.

Change-Id: I3341ca075e8c7c0b671a76f226b7bdb99cb12465
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDeprecate ClassToInstance-taking methods 42/110142/4
Robert Varga [Mon, 5 Feb 2024 10:03:07 +0000 (11:03 +0100)]
Deprecate ClassToInstance-taking methods

Using a ClassToInstanceMap is not nice, deprecate these methods for
their simple equivalents.

JIRA: MDSAL-854
Change-Id: Ic9574283427c57da8d56c24d34e4d13a02159f77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove RpcProviderService.registerRpcImplementations() 41/110141/4
Robert Varga [Mon, 5 Feb 2024 09:58:36 +0000 (10:58 +0100)]
Improve RpcProviderService.registerRpcImplementations()

Each Rpc exposes its contract via implementedInterface(). Use this
information to make registerRpcImplementations() more user friendly.

JIRA: MDSAL-854
Change-Id: Iec6b3f65207078304380b1e3050da00c644c4ce4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not use ClusteredDOMDataTreeChangeListener 31/110031/1
Robert Varga [Sat, 27 Jan 2024 14:01:25 +0000 (15:01 +0100)]
Do not use ClusteredDOMDataTreeChangeListener

mdsal-replicate-netty is a simple user, migrate it.

Change-Id: I4abf1e3f6dbb6f11ee4bb8c8893c5b1acf43fdec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate DataTreeModification method users 30/110030/1
Robert Varga [Sat, 27 Jan 2024 13:58:52 +0000 (14:58 +0100)]
Migrate DataTreeModification method users

Use new methods instead of the deprecated ones.

Change-Id: If56da4296584228d0e6d18482d0b8b6f2b871c20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAdd yang.binding.contract documentation 17/109917/3
Robert Varga [Mon, 22 Jan 2024 22:12:27 +0000 (23:12 +0100)]
Add yang.binding.contract documentation

Document the contents of the contract package.

Change-Id: I02cdf674fa591decc85339f8049ba281c4cd62a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump versions to 13.0.1-SNAPSHOT 83/109883/1
Robert Varga [Sat, 20 Jan 2024 16:32:22 +0000 (17:32 +0100)]
Bump versions to 13.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia471501c5f24994491208d9776fd4e74e581f156
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRelease mdsal v13.0.0
jenkins-releng [Sat, 20 Jan 2024 13:12:42 +0000 (13:12 +0000)]
Release mdsal

3 months agoRename singleton service components 80/109880/4
Robert Varga [Sat, 20 Jan 2024 09:52:00 +0000 (10:52 +0100)]
Rename singleton service components

We only have an API and an implementation. Make sure we use the
appropriate naming.

Change-Id: I471520afcb6902cf6229901a7a29bee9ba13223d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix EOSClusterSingletonServiceProvider shutdown 79/109879/1
Robert Varga [Sat, 20 Jan 2024 09:43:55 +0000 (10:43 +0100)]
Fix EOSClusterSingletonServiceProvider shutdown

If we close the listener registration we will not be getting any events.
Prevent that by staggered shutdown, where we first mark the instance as
shutting down and only after it has shut down we release the listeners.

JIRA: MDSAL-853
Change-Id: Ibea92376ca83b2cd9f87de5302047503f609ebca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up constant reference 63/109863/1
Robert Varga [Fri, 19 Jan 2024 13:12:27 +0000 (14:12 +0100)]
Clean up constant reference

We have two methods with the same name, make sure we use the right
constant when referencing it.

JIRA: MDSAL-852
Change-Id: I7628d2c997e3c62895984d6d85672c65ff9f0ce7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 114cc6781dcce3101ff893d39786eef2c7ea5646)
(cherry picked from commit 1a6177ae8a38e900ed4d271f528f1c4b4f94534c)

3 months agoDeprecate Clustered(DOM)DataTreeChangeListener 16/107916/8
Robert Varga [Thu, 18 Jan 2024 20:33:28 +0000 (21:33 +0100)]
Deprecate Clustered(DOM)DataTreeChangeListener

The semantics of ClusteredDOMDataTreeChangeListener is the default we
want to expose from DataTreeChangeExtension. Any integration with
clusters, or any other details, really, should happen through a
dedicated DOMDataBroker.Extension.

Redefine DataTreeChangeExtension, retaining compatibility methods with
migration guidance.

This cascades to ClusteredDataTreeChangeListener, which is just a
mdsal-binding-api mirror of the DOM concept.

JIRA: MDSAL-819
Change-Id: Ice4e1db64d34241115226d532b226cbdff8e045c
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExpose a List of changes in DOMDataTreeChangeListener 47/109847/9
Robert Varga [Thu, 18 Jan 2024 19:14:29 +0000 (20:14 +0100)]
Expose a List of changes in DOMDataTreeChangeListener

The collection of changes needs to be considered to be ordered. This
patch codifies that by using a List. This has the up side of making it
easier to access first/last item as well as to navigate around.

Change-Id: If747e0000f8a9bb33d934b84c0c078d56d4c6126
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove redundant version specification 50/109850/1
Robert Varga [Thu, 18 Jan 2024 22:39:08 +0000 (23:39 +0100)]
Remove redundant version specification

This version is inherited from parent, do not specify it.

Change-Id: I98d90f44c940eb281a1bf1a302cb9ae2fa070564
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRename DOMDataTreeChangeService 49/109849/5
Robert Varga [Thu, 18 Jan 2024 19:30:44 +0000 (20:30 +0100)]
Rename DOMDataTreeChangeService

This is not a free-standing service, but a well-known extension. Move it
to DOMDataBroker.

JIRA: MDSAL-841
Change-Id: Ib1cf203f6f285d7fa4f3922fff6958665839a9a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRename DOMDataTreeCommitCohortRegistry to CommitCohortExtension 48/109848/5
Robert Varga [Thu, 18 Jan 2024 19:27:33 +0000 (20:27 +0100)]
Rename DOMDataTreeCommitCohortRegistry to CommitCohortExtension

This is a well-known extension, co-locate it with DOMDataBroker, so it
is near at hand.

JIRA: MDSAL-841
Change-Id: Idf71920640e4c9dc1a8e76d8bf3d4a7ac7b5fd40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up documentation 46/109846/2
Robert Varga [Thu, 18 Jan 2024 18:52:54 +0000 (19:52 +0100)]
Clean up documentation

We are about to duplicate a number of methods, clean up their
documentation, so we do not accumulate work.

Change-Id: I119b4009ebef1fe8af4a7cc8057ee86bdf2e1621
JIRA: MDSAL-819
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate callers of getData{Before,After} 45/109845/1
Robert Varga [Thu, 18 Jan 2024 18:54:50 +0000 (19:54 +0100)]
Migrate callers of getData{Before,After}

mdsal-binding-api should be using non-deprecated methods.

Change-Id: Iedbcc62c7b3d924bd850b0bf28b8897eb8c00e25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse Locale.ROOT for toUpperCase 40/109840/1
Robert Varga [Thu, 18 Jan 2024 16:41:27 +0000 (17:41 +0100)]
Use Locale.ROOT for toUpperCase

We can just assert this is the root locale, not a some particular
language.

Change-Id: Ibce067abf252162740a9c6ed88a3beff99f455b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExclude generated services from SpotBugs 39/109839/1
Robert Varga [Thu, 18 Jan 2024 15:12:38 +0000 (16:12 +0100)]
Exclude generated services from SpotBugs

We have additional package root we want to exclude, update the list.

JIRA: MDSAL-836
Change-Id: If5e0e15b09570a4e8ff5e9e35d058e3bee018c2c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix ModuleInfoSnapshotResolver 38/109838/4
Robert Varga [Thu, 18 Jan 2024 14:52:06 +0000 (15:52 +0100)]
Fix ModuleInfoSnapshotResolver

Previous update missed the ModuleInfoSnapshotResolver update, leading to
broker OSGi functionality.

Update both callsites to directly derive root package name from the
advertized namespace.

JIRA: MDSAL-836
Change-Id: I520824b59018afd2d7afdf06173889f90fd70449
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoImprove OSGiDOMSchemaService printouts 36/109836/3
Robert Varga [Thu, 18 Jan 2024 14:34:58 +0000 (15:34 +0100)]
Improve OSGiDOMSchemaService printouts

Isolate toString() interactions to ModelContextListener and establish
that it is a ForwardingObject.

Change-Id: I4baa3eff0623fd9cdc0629e50f8cbf136a5d5e04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump yangtools to 13.0.1 32/109832/1
Robert Varga [Thu, 18 Jan 2024 10:42:04 +0000 (11:42 +0100)]
Bump yangtools to 13.0.1

Adopt fixes from upstream that are needed downstream.

Change-Id: I5b31163fff4ab9c1206167f57815014e24010817
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoOverride Rpc/Action invoke method 27/109827/3
Robert Varga [Thu, 18 Jan 2024 06:56:56 +0000 (07:56 +0100)]
Override Rpc/Action invoke method

Add a plain @Override method for Rpc/Action's invoke method, so that it
is manifested in the generated type.

JIRA: MDSAL-852
Change-Id: I7db7c9036bdb3051ae48a903b66df933fb338fae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoChanged $Yang* generation package and name 05/107705/14
Oleksandr Panasiuk [Tue, 5 Sep 2023 08:04:23 +0000 (11:04 +0300)]
Changed $Yang* generation package and name

The naming of these classes is rather unfortunate, as it starts with $
due to the requirement not to conflict with other generated classes. So
they were renemed to avoid dollar sign usage.
Also the root package for theese classes was changed from
org.opendaylight.yang.gen.v1 to org.opendaylight.yang.svc.v1.
A lot of test classes are touched in this patch but no logic were
changed there, its just providing a new path for YangModuleInfoImpl.

JIRA: MDSAL-836
Change-Id: If9e43d21063c2fc48d8adbf0ccfc2406fe760054
Signed-off-by: Oleksandr Panasiuk <oleksandr.panasiuk@pantheon.tech>
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRevert "Bump blueprint version" 12/109812/2
Robert Varga [Wed, 17 Jan 2024 07:15:59 +0000 (08:15 +0100)]
Revert "Bump blueprint version"

This reverts commit 2b732eb188c6b34a91488308318a590a14cf2c07, as the
version will not be moving.

JIRA: CONTROLLER-2090
Change-Id: I7c6a4ca583da85551e08d1fc124dc49802bc482e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix OSGiDOMSchemaService 05/109805/2
Robert Varga [Tue, 16 Jan 2024 17:27:53 +0000 (18:27 +0100)]
Fix OSGiDOMSchemaService

The conversion here got confused and has broken listeners -- these are
published through OSGi SR, so we failed to pick them up from SR.

Change-Id: I71ce644584ea3efbe6465aaff4c33d876e951e05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoTeach AbstractDOMDataBroker about commit cohorts 87/109787/4
Robert Varga [Mon, 15 Jan 2024 19:35:30 +0000 (20:35 +0100)]
Teach AbstractDOMDataBroker about commit cohorts

This is something the Controller version of this class recognizes, but
we do not. Close the gap.

JIRA: MDSAL-851
Change-Id: I248d471813054ae2b82cdeef8ea1ff58750d4baf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMove AbstractDOMDataBroker to mdsal-dom-spi 86/109786/2
Robert Varga [Mon, 15 Jan 2024 19:23:25 +0000 (20:23 +0100)]
Move AbstractDOMDataBroker to mdsal-dom-spi

This patch publishes AbstractDOMDataBroker so it can be reused by other
implementations.

JIRA: MDSAL-851
Change-Id: I70a472ad27678f7c2e50be8ecc3ffbcf89249b86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoReport ExactDataObjectStep from DataObjectModification 85/109785/1
Robert Varga [Sat, 13 Jan 2024 15:42:21 +0000 (16:42 +0100)]
Report ExactDataObjectStep from DataObjectModification

DataObjectModification relates to an exact DataObject, hence it should
expose ExactDataObjecStep.

While we are at it, we clean up some of the method naming and disconnect
it from Identifiable.

JIRA: MDSAL-815
Change-Id: Iaa2650ee27611bb0cfa2912d5069ad6e79f01bc0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up AugmentationCodecContext 81/109781/2
Robert Varga [Mon, 15 Jan 2024 16:02:59 +0000 (17:02 +0100)]
Clean up AugmentationCodecContext

Use A for Augmentation<?>, there is just no need to mix in DataObject.

JIRA: MDSAL-815
Change-Id: I8fc122a85e83878e7cda62420163ca0ed010299e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump blueprint version 78/109778/1
Robert Varga [Mon, 15 Jan 2024 13:18:35 +0000 (14:18 +0100)]
Bump blueprint version

The namespace version is going to change, adjust for that.

JIRA: CONTROLLER-2090
Change-Id: I6bbc9b82d650793c54f8cbf5c8f7f3054b7635c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCovert yang-binding to bnd-parent 66/109766/2
Robert Varga [Sun, 14 Jan 2024 15:32:18 +0000 (16:32 +0100)]
Covert yang-binding to bnd-parent

There are just a few exported packages, switch to bnd-parent.

Change-Id: Iaabeff023f27d25739f08f31560f339df2ee6dde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up dependencies a bit 65/109765/3
Robert Varga [Sun, 14 Jan 2024 14:44:48 +0000 (15:44 +0100)]
Clean up dependencies a bit

Eliminate yet another set of warnings.

Change-Id: I16f659072a1c794c28daac43ccb37ffca9c327bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate users of Builders/ImmutableNodes 64/109764/4
Robert Varga [Sun, 14 Jan 2024 10:15:30 +0000 (11:15 +0100)]
Migrate users of Builders/ImmutableNodes

Update references to use data.spi.node.ImmutableNodes.

Change-Id: Ide361652366ef8dc5ade34bb513219ce7cf448f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExpose completion future from WriteOperations 41/89141/19
Robert Varga [Mon, 20 Apr 2020 09:35:37 +0000 (11:35 +0200)]
Expose completion future from WriteOperations

WriteOperations (and its counterparts) does not allow code to control
when a transaction is committed or aborted. This adds a layer of
separation, but unfortunately also prevents the encapsulated code from
reacting to when the changes are actually committed (or not).

This capability is quite important for chaining cache updates and
similar tasks.

Expose a FluentFuture<?>. which is guaranteed to complete when its
transaction is completed -- either successfully or not.

JIRA: MDSAL-61
Change-Id: Ie75671842b93fb9e63f1c2aa9ec72f25904da039
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoHide CodecContext methods 56/109756/8
Robert Varga [Fri, 12 Jan 2024 11:24:34 +0000 (12:24 +0100)]
Hide CodecContext methods

There is no point having these protected, just make them
package-private.

While we are here, also centralize implementations, as otherwise we have
duplicates.

JIRA: MDSAL-815
Change-Id: I7d708c5d508f49fb8c3224463d8c36fd9cf5e021
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSilence maven-javadoc-plugin 63/109763/1
Robert Varga [Sat, 13 Jan 2024 22:12:46 +0000 (23:12 +0100)]
Silence maven-javadoc-plugin

Sprinkle lint suppressions for missing javadocs, cleaning up build
output and focusing on real issues.

Change-Id: I022b6a2f86ab5e21ff74a19a85c3802664b5c7de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExpose uuid/instant from CommitInfo 61/109761/2
Robert Varga [Sat, 13 Jan 2024 18:35:55 +0000 (19:35 +0100)]
Expose uuid/instant from CommitInfo

A particular commit can have an UUID or an Instant when it occurred, or
both. Also this information is something we would like to include in
Serializable contexts -- and therefore we promote CommitInfo to a
non-Beta Serializable.

JIRA: YANGTOOLS-1559
Change-Id: I1a2eb7f41484c4088e6ce310b3ab78a26022ad40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCommitInfo forward compatibility 62/109762/2
Robert Varga [Sat, 13 Jan 2024 19:29:25 +0000 (20:29 +0100)]
CommitInfo forward compatibility

This patch refactors EmptyCommitInfo to implement the future CommitInfo
interaface -- carrying uuid/time information and being Serializable.

JIRA: YANGTOOLS-1554
Change-Id: Ibe5070b17fe50fc8aa7f75a7483aa9f0e9ef5139
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoConvert mdsal-common-api to bnd-parent 60/109760/1
Robert Varga [Sat, 13 Jan 2024 18:07:09 +0000 (19:07 +0100)]
Convert mdsal-common-api to bnd-parent

Introduce a bnd-parent, which does not use maven-bundle-plugin, and
convert mdsal-common-api to use it.

Change-Id: I74046224b85e70970914867b56b8bcb3d31680ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoPromote dom-parent to bundle-parent 59/109759/1
Robert Varga [Sat, 13 Jan 2024 17:01:39 +0000 (18:01 +0100)]
Promote dom-parent to bundle-parent

This parent is used all over place. It really is MD-SAL's
'bundle-parent', so let's promote and rename it.

While we are at it, also switch its parent to yangtools' bundle-parent
and define correct SCM.

Change-Id: Idf72a16eb6ceb1c2816d79d28470efd7665b02ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMake AugmentationCodecPrototype generic 50/109750/11
Robert Varga [Thu, 11 Jan 2024 23:35:38 +0000 (00:35 +0100)]
Make AugmentationCodecPrototype generic

Augmentations should capture their target type, which eliminates the
need for quite a few casts.

JIRA: MDSAL-815
Change-Id: I3d9c8326ac2bb24135c66ecfe240ed95cea98318
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDeprecate BindingCodecTreeNode.getSchema() 58/109758/1
Robert Varga [Fri, 12 Jan 2024 20:07:11 +0000 (21:07 +0100)]
Deprecate BindingCodecTreeNode.getSchema()

The BindingCodecTreeNode hierarchy should be expressive enough so that
users do not need the underlying schema. Deprecate getSchema() for
removal.

Change-Id: I58c18075ce78b11db2a922f5de4d4859c256bd35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefactor PathArgument to DataObjectStep 92/109692/21
Robert Varga [Tue, 9 Jan 2024 20:14:59 +0000 (21:14 +0100)]
Refactor PathArgument to DataObjectStep

InstanceIdentifier.PathArgument is the basic modeling construct for
expressing a path composed of DataObject type references.

Extract it to a top-level construct, DataObjectStep, which has tree
specializations. AbstractPathArgument is kept around for serialization
complatibility.

This has the nice property of capturing the three possible addressing
states, so we can discern them when we see them.

Furthermore there is now only YangInstanceIdentifier.PathArgument, which
makes for cleaner method signatures and imports.

JIRA: MDSAL-815
Change-Id: I22706ccaecae4b70e8afe2644fc74057953c32b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoReparent ChoiceCodecContext 49/109749/6
Robert Varga [Thu, 11 Jan 2024 22:37:43 +0000 (23:37 +0100)]
Reparent ChoiceCodecContext

Choice as itself does not map to a DataObject, but rather to a ChoiceIn
-- it is the individual cases that also map to DataObject.

In this patch we reparent ChoiceCodecContext to be a subclass of
DataContainerCodecContext, which allows us to ditch the idea that a
there is a InstanceIdentifier.PathArgument corresponding to this
context.

A nice bonus is that we end up with exactly one serialization method,
which is delegating to the individual case.

Another nice thing is we have a natural place to host the case lookup
logic -- which fits squarely with
ChoiceCodecContext.bindingPathArgumentChild() contract.

JIRA: MDSAL-815
Change-Id: I12a80c849f6405e0e5723afc3f31704a2ad604a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRetain protype in DataContainerCodecContext 48/109748/2
Robert Varga [Thu, 11 Jan 2024 18:42:26 +0000 (19:42 +0100)]
Retain protype in DataContainerCodecContext

Acknowledge that DataContainerCodecContext is always instantiated from a
prototype and retain it in the base class.

This ends up centralizing things enough to eliminate an ugly cast we are
using in AugmentationCodecContext.

JIRA: MDSAL-815
Change-Id: Ib604918c2d9e180fece0583331fc2486797cf546
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoLoosen BindingDataContainerCodecTreeNode.getBindingClass() 46/109746/2
Robert Varga [Thu, 11 Jan 2024 17:56:57 +0000 (18:56 +0100)]
Loosen BindingDataContainerCodecTreeNode.getBindingClass()

Do not require BindingObject, as we stream navigation encounters
ChoiceIn interface, which is not a BindingObject -- it defers to its
constituent children to provide the BindingObject contract through their
DataObject inheritence.

JIRA: MDSAL-815
Change-Id: I76d1c2405138da2f6985216aef2dfa4580cea724
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSeparate out DataContainerPrototype 45/109745/1
Robert Varga [Thu, 11 Jan 2024 15:38:56 +0000 (16:38 +0100)]
Separate out DataContainerPrototype

We have CommonDataObjectCodecPrototype defining strict prerequisites
while providing awefully little in terms of API worth.

Split out DataContainerPrototype, which exposes a typed javaClass() and
the corresponding runtimeType().

JIRA: MDSAL-815
Change-Id: Icaca2603e3b946764ff9d4157ab04be95bd4dde2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoHide CodecContextSupplier 42/109742/3
Robert Varga [Thu, 11 Jan 2024 12:05:53 +0000 (13:05 +0100)]
Hide CodecContextSupplier

Refactoring InstanceIdentifier.Item flushes out a problem with the class
hierarchy of ChoiceNodeContextPrototype.

Start off by refactoring CodecContextSupplier, introducing
LazyCodecContextSupplier base class.

JIRA: MDSAL-815
Change-Id: I79fe079d9fc4b0adf166c1a8b2561fb03a2f071f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove (DOM)TransactionChainListener 82/109682/5
Robert Varga [Mon, 8 Jan 2024 22:35:31 +0000 (23:35 +0100)]
Remove (DOM)TransactionChainListener

Rework error reporting by attaching listeners to a separately exposed
ListenableFuture.

JIRA: MDSAL-850
Change-Id: I61766cb8691ca5f30cdef0908a351bda1f27881a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse ServiceGroupIdentifier in ServiceGroup 52/109252/7
Robert Varga [Sat, 9 Dec 2023 11:25:50 +0000 (12:25 +0100)]
Use ServiceGroupIdentifier in ServiceGroup

Squashing ServiceGroupIdentifier into a String is a bad idea when
interacting with ServiceGroup -- at the end of the day it is its
identifier.

Switch to using this identifier, but keep maps based on String.

Change-Id: I5270afa40f08939e9f9f1e191a036a50aa465678
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use Builders in InMemoryDataStoreTest 83/109683/1
Robert Varga [Mon, 8 Jan 2024 23:14:43 +0000 (00:14 +0100)]
Do not use Builders in InMemoryDataStoreTest

This is a rather straightforward migration.

Change-Id: I763457f2e35e34ba2ec99a7304b8d9fbe846a6d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix BindingStructuralType.isNotAddressable() 53/109653/7
Robert Varga [Sat, 6 Jan 2024 04:09:22 +0000 (05:09 +0100)]
Fix BindingStructuralType.isNotAddressable()

The check is missing the anydata case, fix that.

Change-Id: I73053c24afb69f28b13f42b68fc3a41e2fb78172
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefactor DOMYangTextSourceProvider 52/109652/9
Robert Varga [Sat, 6 Jan 2024 03:48:25 +0000 (04:48 +0100)]
Refactor DOMYangTextSourceProvider

This should really be a proper extension with its own API. While we are
at it.

mdsal-binding-runtime-api is made synchronous, as there is just no need
to use futures.

Change-Id: I3711662242df8d912c2536a3d73d4f86beea2c33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump yangtools to 13.0.0 82/109282/15
Robert Varga [Mon, 11 Dec 2023 10:19:04 +0000 (11:19 +0100)]
Bump yangtools to 13.0.0

This adopts yangtools-13.0.0 and updates the various integration
surfaces.

Change-Id: Ie9e2ed6fec32bdb7cd98803552a4500a5b44f127
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up mdsal-eos-binding-adapter dependencies 83/109483/1
Robert Varga [Fri, 29 Dec 2023 11:16:38 +0000 (12:16 +0100)]
Clean up mdsal-eos-binding-adapter dependencies

We use JDT annotations and not SpotBugs annotations, adjust dependencies
accordingly.

Change-Id: I6c0a5824eba297f99a244aedd52c67077061d0d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use mockito-subclass 82/109482/1
Robert Varga [Fri, 29 Dec 2023 11:12:31 +0000 (12:12 +0100)]
Do not use mockito-subclass

Upgraded Mockito seems to cope well with the tests now, remove the
workaround.

Change-Id: I4130a2fff5a62e73d56b69354287b13a8caba615
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate CodecDataObjectAnalysis 56/106856/4
Robert Varga [Mon, 10 Jul 2023 14:29:15 +0000 (16:29 +0200)]
Eliminate CodecDataObjectAnalysis

We really do not want to have a ton of specializations -- at the end of
the day we just need to properly specialize generation and constructor
access.

While this introduces a bit of code duplication, it also attaches more
properly the individual types to their implementations and the contracts
therein.

JIRA: MDSAL-805
Change-Id: I88b9222835817d2f52469c219844b2f05485dbc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump byte-buddy to 1.14.11 51/109451/1
Robert Varga [Thu, 28 Dec 2023 21:48:23 +0000 (22:48 +0100)]
Bump byte-buddy to 1.14.11

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.10
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.11

Change-Id: I14982abcc38545c72afce2abf9ffcd613534f5c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoCapture collection type class 30/109430/1
Robert Varga [Wed, 27 Dec 2023 00:13:01 +0000 (01:13 +0100)]
Capture collection type class

Improve CodeHelpers safety by not losing Class type.

Change-Id: I585afdbda3328b018764627631dff7c8df372c01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoSkip SpotBugs for generated code 29/109429/2
Robert Varga [Tue, 26 Dec 2023 20:50:19 +0000 (21:50 +0100)]
Skip SpotBugs for generated code

SpotBugs-4.8.3 allows us to explicitly exclude classes from analysis,
take advantage of this facility to suppress Spotbugs on all classes
generated from YANG models.

Change-Id: I81a09e7ba7a1bac9ad1884b36f0bd98a7a3ecde3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoBump upstreams 22/109422/6
Robert Varga [Tue, 26 Dec 2023 20:17:38 +0000 (21:17 +0100)]
Bump upstreams

Adopt:
- odlparent-13.0.10
- yangtools-11.0.5

Also sprinkle @SuppressFBWarnings as needed.

Change-Id: I1649b1e2289f0a6ea2d8919f340dcc8e0b0579f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not pull in spotbugs-annotations into binding-parent 24/109424/3
Robert Varga [Tue, 26 Dec 2023 20:21:55 +0000 (21:21 +0100)]
Do not pull in spotbugs-annotations into binding-parent

Binding constructs no longer emit @SuppressFBWarnings, hence there is no
point in pulling in this dependency.

Change-Id: If0cdc88df2b2d585fb3bf2defb07d928325466a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not leak SpotBugs from yang-binding 28/109428/2
Robert Varga [Tue, 26 Dec 2023 23:52:34 +0000 (00:52 +0100)]
Do not leak SpotBugs from yang-binding

We do not want to pollute user-visible classes with @SuppressFBWarnings,
as that is a purely-internal thing.

Isolate the single method requiring suppression into its own
package-private class.

Change-Id: I200ef79c512063f531f1dd18ed0148439c850563
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse constructor injection in mdsal-replicate-netty 27/109427/1
Robert Varga [Tue, 26 Dec 2023 23:33:28 +0000 (00:33 +0100)]
Use constructor injection in mdsal-replicate-netty

We really do not want to retain references here, use simple constructor
injection instead.

Change-Id: I72a9f6f2e80d19f57d6c113132e173e569fb4ef9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse constructor injection for OSGi codec services 26/109426/1
Robert Varga [Tue, 26 Dec 2023 23:12:58 +0000 (00:12 +0100)]
Use constructor injection for OSGi codec services

We can easily use constructor injection, which eliminates the need for
an explicit field.

Change-Id: I292169b1dd98dd0341a2b5067495bbc79a1c41e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse constructor injection in OSGiDOMSchemaService 25/109425/1
Robert Varga [Tue, 26 Dec 2023 22:33:01 +0000 (23:33 +0100)]
Use constructor injection in OSGiDOMSchemaService

Constructor injections makes listenerFactory a final field, which is
exactly what we want.

Change-Id: Idc88f704e30a1bf00e367b31e0c8f168dd9761e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUnify {Action,Notification}Spec lookup 83/109383/2
Robert Varga [Tue, 19 Dec 2023 09:59:23 +0000 (10:59 +0100)]
Unify {Action,Notification}Spec lookup

These two codepaths are duplicate code, generalize them into a utility
method with appropriate parameters.

Change-Id: Idbe778785f8f1227cfd3965dfd541a78f2b66d3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMove binding.model.api documentation 86/109386/1
Robert Varga [Tue, 19 Dec 2023 12:49:28 +0000 (13:49 +0100)]
Move binding.model.api documentation

Package documentation resides in the wrong file, move it.

Change-Id: I77d1c5f3b411df7ebb855ccaeb6c7c8d9d1184cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoReuse found Set 85/109385/1
Robert Varga [Tue, 19 Dec 2023 10:10:14 +0000 (11:10 +0100)]
Reuse found Set

We are just transferring entries here, so let's reuse the single object
and clear() after each pass.

JIRA: MDSAL-669
Change-Id: Ie41ba63087c8ad0fdc5a581a7d7c4c8dc77f8677
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove duplicate documentation 84/109384/1
Robert Varga [Tue, 19 Dec 2023 10:09:22 +0000 (11:09 +0100)]
Remove duplicate documentation

We have directUsers() described, rename the field and drop superfluous
documentation.

JIRA: MDSAL-669
Change-Id: I3824704f9aa6b15c88a1f0118cdac034b939bb80
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRetain grouping/uses instantiation vectors 48/104748/36
Samuel Schneider [Fri, 3 Mar 2023 07:42:50 +0000 (08:42 +0100)]
Retain grouping/uses instantiation vectors

We need the ability fo find all instantiations of a grouping for
closed-world analysis of BindingRuntimeTypes.

This analysis is need to determine, for example:
- possible types of 'type leafref's pointing outside a grouping,
  to determine which Binding/DOM codecs are applicable
- YANG/Binding overload mapping, i.e. whether a 'container'
  defined in a grouping is instantiated only once or multiple
  types, to use a strongly-bound CodecDataObject it the former case

This patch exposes a GroupingRuntimeType.instantiations(), which exposes
exactly this information.

DefaultGroupingRuntimeType stores this information in the form of
a set of vectors, each pointing either to another grouping or to a
concrete instantiation.

GeneratorReactor collects this information sufficiently early so that it
can be also used to perform partial closed-world analysis during
compile-time.

JIRA: MDSAL-669
Change-Id: I2e21a6b93ce30d9bd1022be5747d44663b6198fc
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not use BindingReflections.findQName() 82/109382/1
Robert Varga [Tue, 19 Dec 2023 08:41:06 +0000 (09:41 +0100)]
Do not use BindingReflections.findQName()

Use BindingRuntimeTypes to resolve the RuntimeType for both actions and
notifications, removing the need to use BindingReflections.findQName().

JIRA: MDSAL-781
Change-Id: Ic49189377a53d35367f0c4dcfac27b28bb6c77e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not fish for RpcInput/RpcOutput runtime types 62/109362/5
Robert Varga [Sun, 17 Dec 2023 01:37:23 +0000 (02:37 +0100)]
Do not fish for RpcInput/RpcOutput runtime types

BindingRuntimeTypes provides all known types by their JavaTypeName. This
means we do not have to play games and just look the
{Input,Output}RuntimeType directly.

JIRA: MDSAL-781
Change-Id: If82275714a57f1dc173eae43d4407c0400cfc0e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse bindingChild() to locate notifications 63/109363/6
Robert Varga [Sun, 17 Dec 2023 01:46:40 +0000 (02:46 +0100)]
Use bindingChild() to locate notifications

BindingRuntimeTypes provides an interface to directly find
NotificationRuntimeType based on its name. Use it instead of dancing
around with reflection.

JIRA: MDSAL-781
Change-Id: I3ba1a06d8dc07700bd86a3288116989a1a445138
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse @Nullable in AbstractExplicitGenerator.runtimeType() 58/109358/7
Robert Varga [Sat, 16 Dec 2023 20:41:36 +0000 (21:41 +0100)]
Use @Nullable in AbstractExplicitGenerator.runtimeType()

Rather than using Optional, split the two user groups to those who check
for null and who assume non-null.

The former continue to call runtimeType() and latter defer to
getRuntimeType().

Change-Id: I0818d806204007127a956f7598267735c90faca9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoImprove isOriginalDefinition() 64/109364/2
Robert Varga [Sun, 17 Dec 2023 12:33:39 +0000 (13:33 +0100)]
Improve isOriginalDefinition()

We have an already-casted AddedByUsesAware, use that for the next
instanceof check.

Change-Id: I2e9a172c02fbc3e97d8c90e477cecaf8fa9504f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove BindingRuntimeTypes.findRpc{Input,Output} 60/109360/10
Robert Varga [Sat, 16 Dec 2023 20:56:43 +0000 (21:56 +0100)]
Remove BindingRuntimeTypes.findRpc{Input,Output}

These methods are no longer used, remove them along with the indexing
support. This indes {Input,Output,Rpc}Generator.

Change-Id: I90820f5e925fd7e72dbe68572e5c671ef277da29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoChange BindingRuntimeTypes.findIdentity() 61/109361/4
Robert Varga [Sat, 16 Dec 2023 22:43:15 +0000 (23:43 +0100)]
Change BindingRuntimeTypes.findIdentity()

Rename the method to identityChild(), returning a @Nullable instead of
an Optional. Add the appropriate documentation.

Change-Id: I9c95c61d015595f876371cfc5e1e521a1b4b3cbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse schemaTreeChild() to lookup input/output 59/109359/3
Robert Varga [Sat, 16 Dec 2023 20:55:17 +0000 (21:55 +0100)]
Use schemaTreeChild() to lookup input/output

We have proper RpcRuntimeType, hence we can follow along the schema tree
axis to obtain the runtime types for RPC input/output.

Change-Id: Iea34601edc340b788fc3ee4e17c5da7e245734b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoModernize ListGenerator 57/109357/1
Robert Varga [Sat, 16 Dec 2023 20:28:26 +0000 (21:28 +0100)]
Modernize ListGenerator

Use local variable type inference. Also use local variables for keyGen
checking so as to eliminate false warnings.

Change-Id: Ic85f57228e42cfbc6cfe1f4a2dbd16b2798934b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDrop @Beta from mdsal.binding.generator.impl.rt 56/109356/1
Robert Varga [Sat, 16 Dec 2023 15:58:00 +0000 (16:58 +0100)]
Drop @Beta from mdsal.binding.generator.impl.rt

This package is not exposed to outside world, there is no point in
having @Beta annotations here. Also make
Default{Input,Output}RuntimeType final.

Change-Id: I1506b99651bcc079c1d1d295e60d8a351f78a4a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up AbstractCompositeRuntimeType 55/109355/3
Robert Varga [Sat, 16 Dec 2023 13:59:55 +0000 (14:59 +0100)]
Clean up AbstractCompositeRuntimeType

SpotBugs is no longer complaining about the Comparator, hence we can
completely remove the dependency of spotbugs-annotations.

While we are here, also clean up the Arrays.binarySearch() assumption we
make, so we tolerate if the key is reported as the first argument.

Change-Id: I97b9683b64e49617ca529826e37392face70739a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoFix wrong annotation use 54/109354/2
Robert Varga [Sat, 16 Dec 2023 14:12:38 +0000 (15:12 +0100)]
Fix wrong annotation use

Use JDT annotation instead of SpotBugs, reducing our exposure.

Change-Id: I1fc1e13c5ae476a456a1ffd4db7182f118985945
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse instanceof pattern in AbstractCompositeRuntimeType 53/109353/2
Robert Varga [Sat, 16 Dec 2023 13:45:01 +0000 (14:45 +0100)]
Use instanceof pattern in AbstractCompositeRuntimeType

Rather than a plain verify() and explicit cast, use an instanceof
pattern and an explicit throw.

Change-Id: I4583a650dd0ed875cbc2420ec60907c99a122876
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse instanceof pattern DefaultChoiceRuntimeType 52/109352/2
Robert Varga [Sat, 16 Dec 2023 13:35:00 +0000 (14:35 +0100)]
Use instanceof pattern DefaultChoiceRuntimeType

Remove an explicit cast in favor of an instanceof pattern.

Change-Id: Iffe0425ba48a43396667354d4d7b22f882301445
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUnify GeneratedType verification 51/109351/1
Robert Varga [Sat, 16 Dec 2023 12:58:17 +0000 (13:58 +0100)]
Unify GeneratedType verification

We have number of places where we do verify a Type is a GeneratedType.

Introduce AbstractExplicitGenerator.verifyGeneratedType() to reduce
duplication and explicit casts.

Change-Id: Idcdc2344d59befa2c39d74893348de6627b6c39d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoModernize GeneratorReactor 50/109350/2
Robert Varga [Sat, 16 Dec 2023 12:16:31 +0000 (13:16 +0100)]
Modernize GeneratorReactor

Use local variable type inference and instanceof patterns.

Change-Id: I2f9222d0e6535bfaf7655ef6afccbb2ef431ddd4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse Module.asEffectiveStatement() 49/109349/2
Robert Varga [Sat, 16 Dec 2023 12:07:30 +0000 (13:07 +0100)]
Use Module.asEffectiveStatement()

Eliminate a verifyication by cleanly translating Module to
ModuleEffectiveStatement.

Change-Id: I65a08a388e54132457ac8d99d981cbd332d0c009
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoReduce ObjectRegistration use 61/109261/2
Robert Varga [Sat, 9 Dec 2023 17:06:03 +0000 (18:06 +0100)]
Reduce ObjectRegistration use

We have a few more services which are exposing ObjectRegistration from
APIs for no particularly good reason.

Switch them to use Registration instead, which allows us to reduce
adaptation in some cases.

JIRA: MDSAL-843
Change-Id: I9c88288cd4d57b9fb2fc780d9017fbb3eb5dbd94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up (DOM)DataTreeIdentifier methods 59/109259/5
Robert Varga [Sat, 9 Dec 2023 14:45:47 +0000 (15:45 +0100)]
Clean up (DOM)DataTreeIdentifier methods

These two classes represent the same thing with different addressing
modes. Unfortunately their instantiation is wildly different.

Introduce common.api.LogicalDatastorePath to force them to have the same
shape. While we are at it, make sure the new methods record-friendly.

JIRA: MDSAL-846
Change-Id: I359f77233a37e8cf4c7f7aa340cf2131111835c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoSwitch (DOM)DataTreeIdentifier to serialization proxy 58/109258/3
Robert Varga [Sat, 9 Dec 2023 13:32:41 +0000 (14:32 +0100)]
Switch (DOM)DataTreeIdentifier to serialization proxy

Switch to using proxies on writeout, so the JVM representation is
disconnected from the serial form.

JIRA: MDSAL-844
Change-Id: I090786c58557df9fb2de36bb237c4a8aabd5c37e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoAdd (DOM)DataTreeIdentifier serialization proxies 57/109257/3
Robert Varga [Sat, 9 Dec 2023 13:18:03 +0000 (14:18 +0100)]
Add (DOM)DataTreeIdentifier serialization proxies

Further evolution of these two classes will require allowing for two
distinct specializations.

In order to be able to do that, we need to disconnect them from their
serial form.

This patch instroduces serialization proxies, which know how to write
out and read in these objects without referencing their class name.

JIRA: MDSAL-845
Change-Id: I2b50d3aa5f752d6181dab991a5a8282b079b16df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse constructor activation for adapted services 60/109260/3
Robert Varga [Sat, 9 Dec 2023 16:42:34 +0000 (17:42 +0100)]
Use constructor activation for adapted services

We have a modern OSGi SCR, hence we can use constructor injection and
make the forwarding implementations completely immutable. Also remove
@Beta annotations.

Change-Id: I1132e10a52b7f3f1b32348db537eb22cae8bf5d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove references to java.util.EventListener 55/109255/3
Robert Varga [Sat, 9 Dec 2023 12:32:36 +0000 (13:32 +0100)]
Remove references to java.util.EventListener

java.util.EventListener does not bring much to the table, remove any and
all references to it.

Change-Id: I933c16954ef8674e36e3dd0bd0ce796cbda85084
JIRA: MDSAL-843
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not use ListenerRegistration in mdsal-binding-api 54/109254/3
Robert Varga [Sat, 9 Dec 2023 12:24:47 +0000 (13:24 +0100)]
Do not use ListenerRegistration in mdsal-binding-api

We have a few direct uses of ListenerRegistration. Convert them to use a
plain Registration instead.

JIRA: MDSAL-843
Change-Id: I1946d4ad17854894617931aa4979c74098d61e6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DataTreeIdentifier a bit 56/109256/3
Robert Varga [Sat, 9 Dec 2023 12:37:24 +0000 (13:37 +0100)]
Clean up DataTreeIdentifier a bit

Use a simple hashCode() implementation and instanceof pattern to
simplify equals().

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