mdsal.git
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>
4 months agoFix a deprecation-related warning 53/109253/2
Robert Varga [Sat, 9 Dec 2023 12:23:38 +0000 (13:23 +0100)]
Fix a deprecation-related warning

Implementations of deprecated methods should be deprecated themselves.
Fix that.

Change-Id: I8b1b2738160d0da17b25a0f10fa0fb2c26e1aba6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoServiceGroupIdentifier should be a record 51/109251/4
Robert Varga [Sat, 9 Dec 2023 11:17:32 +0000 (12:17 +0100)]
ServiceGroupIdentifier should be a record

Using a record here allows us to perform proper validation, improve
serialization format and ditch the dependency on yangtools.util.

While we are here, also strengthen the check to reject blank strings.

JIRA: MDSAL-843
Change-Id: Ic1342f1cc8090fbb9892d608d03bea0b64e2e5c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse compareAndExchange() to set closeFuture 50/109250/1
Robert Varga [Sat, 9 Dec 2023 10:51:14 +0000 (11:51 +0100)]
Use compareAndExchange() to set closeFuture

Java 9+ gives us a convenient way to ensure null-safety in this CAS
operation -- compareAndExchange() returns the witness value, i.e.
we get the value instead of a plain boolean false.

Change-Id: I636b0f084170d42bbd99490577917afefe5145e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoFurther cleanups 49/109249/2
Robert Varga [Sat, 9 Dec 2023 09:37:18 +0000 (10:37 +0100)]
Further cleanups

Pick up a few stray fixups which were not part of previous patches.

JIRA: MDSAL-843
Change-Id: I1d8ae43567f004e7c00e3d4176f17cdf3eb0723e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up singleton-service implementation internals 47/109247/2
Robert Varga [Sat, 9 Dec 2023 08:13:28 +0000 (09:13 +0100)]
Clean up singleton-service implementation internals

We have {Active,Placeholder}ServiceGroup, to keep the naming short and
sweet. Also seal ServiceGroup.

JIRA: MDSAL-843
Change-Id: I685ae82e34cf18e603db6e1f51054516caa3d40e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse simple Registration in ClusterSingletonServiceProvider 46/109246/1
Robert Varga [Sat, 9 Dec 2023 07:57:28 +0000 (08:57 +0100)]
Use simple Registration in ClusterSingletonServiceProvider

Move ClusterSingletonServiceRegistration into the implementation, so
that end users operate on a plain Registration.

Within implementation, combine it with its sole base implementation to
form a better-named ServiceRegistration.

JIRA: MDSAL-843
Change-Id: I2506a6f86cd66794612b77791d3f5a5ab058f4b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up mdsal-singleton-dom-impl 45/109245/1
Robert Varga [Sat, 9 Dec 2023 06:38:46 +0000 (07:38 +0100)]
Clean up mdsal-singleton-dom-impl

Fold the multitude of implementation classes into a single
EOSClusterSingletonServiceProvider.

Furthermore do not expose close() from the implemented interface, so
that users do not end up shutting the implementation down.

Eliminate ServiceLoader integration, as we are a stateful component
and therefore want to explicit lifecycle.

The shutdown process is made synchronous, so that close() waits for
everything to settle down.

JIRA: MDSAL-843
Change-Id: I0d137d03d184de07e21e5a9a4329855a021dd433
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove GenericEntityOwnershipService 43/109243/3
Robert Varga [Sat, 9 Dec 2023 05:49:20 +0000 (06:49 +0100)]
Remove GenericEntityOwnershipService

GenericEntityOwnershipService acts as a straight jacket for
EntityOwnershipService and DOMEntityOwnershipService, which end up
overriding its methods.

Opt to duplicate the API contracts rather than having this generic
weirdness.

JIRA: MDSAL-843
Change-Id: I867162f8da643b0163fb20bd4de3f8e790e0d4f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove generics from mdsal-singleton-dom-impl 44/109244/4
Robert Varga [Sat, 9 Dec 2023 02:19:57 +0000 (03:19 +0100)]
Remove generics from mdsal-singleton-dom-impl

Cluster Singleton Service is using horrible amounts of generics just
because of its legacy origin, where there was another implementation
working on EntityOwnershipService.

We have had only a single, DOMEntityOwnershipService-based,
implementation for a long time and it works well.

Remove generics by pushing down DOM-based types.

JIRA: MDSAL-843
Change-Id: I975ab1dbb6cc820039fe72277080b7b2d6247fcb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoEliminate EntityOwnershipChange 42/109242/1
Robert Varga [Sat, 9 Dec 2023 03:55:51 +0000 (04:55 +0100)]
Eliminate EntityOwnershipChange

EntityOwnershipChange is only used in ownership listeners as a single
method argument. Since it is generic on GenericEntity type, users
actually need to use @SuppressFBWarnings to safely get at the entity.

Remove the DTO and inline its contents into
GenericEntityOwnershipListener.ownershipChanged() arguments.

JIRA: MDSAL-843
Change-Id: I49f8714c030ede45b073b0d5f3db5b4c4eb5d013
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRename EntityOwnershipChangeState 41/109241/1
Robert Varga [Sat, 9 Dec 2023 03:46:48 +0000 (04:46 +0100)]
Rename EntityOwnershipChangeState

This is a bit of a misnomer, coming from the fact we communicate this
delta from EntityOwnershipChange.

A better name EntityOwnershipStateChange, as it pertains to a change in
EntityOwnershipState.

JIRA: MDSAL-843
Change-Id: Ief4660088696f966a1d12a1f87c7948b5400e500
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoShare common EntityOwnershipChange 40/109240/1
Robert Varga [Sat, 9 Dec 2023 03:40:27 +0000 (04:40 +0100)]
Share common EntityOwnershipChange

Both Binding and DOM versions differ only in the type of passed entity.
Rename GenericEntityOwnershipChange to EntityOwnershipChange and make it
generic and final.

This allows us to drop some generic arguments, making it easier to
eliminate the listener registration.

Change-Id: Ieab0f9f80ba6832dd14aa1dd86f403cae0f8dc0d
JIRA: MDSAL-843
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove GenericEntityOwnershipListenerRegistration 39/109239/2
Robert Varga [Fri, 8 Dec 2023 22:56:25 +0000 (23:56 +0100)]
Remove GenericEntityOwnershipListenerRegistration

This registration brings absolutely nothing to the table aside from
capturing the entity type -- which is only used in one implementation
as a detail.

Use a simple Registration instead, which ends up simplifying things
quite significantly, to the point of eliminating mdsal-eos-common-spi.

JIRA: MDSAL-843
Change-Id: I5decd9b39ec7da7d11f904842d4849f09c7a7d46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove GenericEntityOwnershipCandidateRegistration 38/109238/1
Robert Varga [Fri, 8 Dec 2023 21:52:37 +0000 (22:52 +0100)]
Remove GenericEntityOwnershipCandidateRegistration

This interface brings nothing to the table. Use a plain Registration
instead, which ends up removing its specializations in both DOM and
Binding worlds and bringing them closer together.

While we are at it, use constructor injection in
mdsal-eos-binding-adapter, so that just have a plain
DefaultEntityOwnershipService.

JIRA: MDSAL-843
Change-Id: Ic5c27830ce18a1d5be4348fa61cd3994486e4325
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up mdsal-eos-common-api 37/109237/1
Robert Varga [Fri, 8 Dec 2023 21:45:00 +0000 (22:45 +0100)]
Clean up mdsal-eos-common-api

Modernize tests and classes contained here before eliminating
registration specializations.

JIRA: MDSAL-843
Change-Id: Idf452e7b847b66c47de2019c883570964e28a85f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove DOMDataTreeCommitCohortRegistration 36/109236/1
Robert Varga [Fri, 8 Dec 2023 21:24:16 +0000 (22:24 +0100)]
Remove DOMDataTreeCommitCohortRegistration

This interface does not bring anything to the table, remove it.

JIRA: MDSAL-843
Change-Id: Ia39a79fe08e06c6f6ec98f9324fcec1fee8d73e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not use ListenerRegistration in DOMStoreTreeChangePublisher 34/109234/4
Robert Varga [Fri, 8 Dec 2023 20:24:53 +0000 (21:24 +0100)]
Do not use ListenerRegistration in DOMStoreTreeChangePublisher

Use a simple Registration, as that is all that is now required.

Furthermore improve DOMStoreTreeChangePublisher interface by hiding
the implementation-internal registration and exposing only the bits
needed via a dedicated sealed interface.

JIRA: MDSAL-843
Change-Id: Ife076937a0e44f5ad140179935b3a8a1a03abb99
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove use of NoOpListenerRegistration 35/109235/1
Robert Varga [Fri, 8 Dec 2023 21:08:17 +0000 (22:08 +0100)]
Remove use of NoOpListenerRegistration

Use a simple lambda, as we just need a simple Registration.

JIRA: MDSAL-843
Change-Id: I85a6be83a4ea8fded2aafab4f1ba13a40200c628
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up AbstractRegistrationTree 33/109233/3
Robert Varga [Fri, 8 Dec 2023 19:22:56 +0000 (20:22 +0100)]
Clean up AbstractRegistrationTree

Inline RegistrationTree{Node,Snapshot} and perform general cleanups:
- hide snapshot() method so it can only be invoked from subclasses
- add @VisibleForTesting annotations
- use Map.computeIfAbsent()
- use local variable type inference
- check result of Collection.remove() on cleanup

JIRA: MDSAL-843
Change-Id: I4776be432da92bfe2f81d0551dd0d81184380987
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DOMRpcRouter registrations 08/109208/4
Robert Varga [Thu, 7 Dec 2023 16:02:45 +0000 (17:02 +0100)]
Clean up DOMRpcRouter registrations

Use a plain AbstractObjectRegistration specialized to
(DOMRpc)AvailabilityListener instead of over-verbose
ListenerRegistrations.

JIRA: MDSAL-843
Change-Id: I1640eed53c2daae8674d42e7b00bbba85b583d36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove DOMRpcImplementationRegistration 07/109207/4
Robert Varga [Thu, 7 Dec 2023 15:53:54 +0000 (16:53 +0100)]
Remove DOMRpcImplementationRegistration

DOMRpcImplementationRegistration is a completely unnecessary
specialization of Registration. Remove it and update
DOMRpcProviderService to simplify implementations.

This change renders AbstractDOMRpcProviderService and
AbstractDOMRpcImplementationRegistration superfluous and hence we remove
them.

JIRA: MDSAL-843
Change-Id: I51871aa0a4a9831acfb6c096cb9b72dbf5aa27d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not use ListenerRegistration in mdsal-dom-api 06/109206/4
Robert Varga [Thu, 7 Dec 2023 14:52:47 +0000 (15:52 +0100)]
Do not use ListenerRegistration in mdsal-dom-api

Using ListenerRegistration implies unneeded generics and details the
clients already know (the instance they registered).

Reduce clutter and verbosity by using a simple Registration return in
all mdsal-dom-api methods.

This cascades to mdsal-dom-broker, and other components, allowing them
to be further simplified.

JIRA: MDSAL-843
Change-Id: I067ae11bff4ce2adac297f7d8caae2d2b695bbfd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DOMMountPointServiceImpl 22/109222/1
Robert Varga [Fri, 8 Dec 2023 11:14:14 +0000 (12:14 +0100)]
Clean up DOMMountPointServiceImpl

Reduce logs and allow the service be found by Dagger and also for it to
be deactivated when needed.

Change-Id: Ibd677c42a178adf286bcce7e06cd0c590dbb6837
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRefactor DOMNotificationSubscriptionListener(Registry) 02/109202/2
Robert Varga [Thu, 7 Dec 2023 14:09:48 +0000 (15:09 +0100)]
Refactor DOMNotificationSubscriptionListener(Registry)

This interface wants to really be a DOMNotificationPublish.Extension.
Rename it and move it to mdsal.dom.api.

JIRA: MDSAL-481
Change-Id: I2b376726b49e64925e259dd4aed584fd3aa47e0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up TracingBroker 00/109200/4
Robert Varga [Thu, 7 Dec 2023 12:40:10 +0000 (13:40 +0100)]
Clean up TracingBroker

Hide LOG and forward requests to it from the two call sites we have.
Also optimize value checking a bit.

Change-Id: I014081ea23c4c1f00ce3345bdb1b8640bfea5014
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRename DOMActionProviderServiceExtension 01/109201/3
Robert Varga [Thu, 7 Dec 2023 12:46:07 +0000 (13:46 +0100)]
Rename DOMActionProviderServiceExtension

Move the extension marker to its base service, with a cute name of
DOMActionProviderService.Extension.

JIRA: MDSAL-841
Change-Id: I7c2ff3b45c2a31fbb0894304e738d511063728fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRename DOMActionServiceExtension to DOMActionService.Extension 99/109199/4
Robert Varga [Thu, 7 Dec 2023 12:18:08 +0000 (13:18 +0100)]
Rename DOMActionServiceExtension to DOMActionService.Extension

Move the extension marker to its base service.

JIRA: MDSAL-841
Change-Id: Iee0212136034a6556caec332296bc6e72b0ab5b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRename DOMDataBrokerExtension to DOMDataBroker.Extension 98/109198/3
Robert Varga [Thu, 7 Dec 2023 11:55:48 +0000 (12:55 +0100)]
Rename DOMDataBrokerExtension to DOMDataBroker.Extension

Move the extension marker to its base service.

JIRA: MDSAL-841
Change-Id: I39efe057322b2bed8a2704c0666ce16d1c457d38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRename DOMSchemaServiceExtension to DOMSchemaService.Extension 95/109195/4
Robert Varga [Thu, 7 Dec 2023 11:47:55 +0000 (12:47 +0100)]
Rename DOMSchemaServiceExtension to DOMSchemaService.Extension

Move the extension marker to its base service.

JIRA: MDSAL-841
Change-Id: I59c204d6663714daffa3059da3ebb9b9e498c49f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMerge DOMExtensibleService into DOMService 62/109062/8
Robert Varga [Fri, 24 Nov 2023 19:56:45 +0000 (20:56 +0100)]
Merge DOMExtensibleService into DOMService

yangtools.concepts.ExtensibleObject provides a generalized view on what
we are trying to achieve here.

This patch adopts it into DOMService, forcing all DOMServices to define
their type-safe Extension point.

This has a side-effect that multiple DOMServices cannot be implemented
by the same object, forcing DOMNotificationRouter to split out its
component services.

JIRA: MDSAL-841
Change-Id: I355fbe82cf913af7682432611b5f25773832a9ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove DOMRpcRouterServices 91/109191/3
Robert Varga [Thu, 7 Dec 2023 09:10:38 +0000 (10:10 +0100)]
Remove DOMRpcRouterServices

Expose DOMRpcRouter as the endpoint without an intermediate interface.
This allows us to neatly increase the scope of OSGiDOM*Service classes
so they work with other dependency injection mechanisms.

JIRA: MDSAL-842
Change-Id: I88d86b23c78defb37f476389002d850a995e9a90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMake sure listeners are immutable 84/109184/2
Robert Varga [Thu, 7 Dec 2023 02:38:45 +0000 (03:38 +0100)]
Make sure listeners are immutable

We guarantee DOMNotificationRouter.listeners to be immutable. Make sure
the field has the correct type to prevent confusion.

Change-Id: Ia4b86c00bdd0517182d4ec0ad63b7f903d3c4ee7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoBump Xtend to 2.33.0 80/109180/1
Robert Varga [Wed, 6 Dec 2023 18:28:21 +0000 (19:28 +0100)]
Bump Xtend to 2.33.0

https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2023/11/21/version-2-33-0

Change-Id: I926f2981d05af6f3cc7da5825377312dfe574c83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DOMNotificationRouterEvent 77/109177/2
Robert Varga [Wed, 6 Dec 2023 16:43:25 +0000 (17:43 +0100)]
Clean up DOMNotificationRouterEvent

Use Empty instead of Void to reduce proliferation of nulls.

Change-Id: I39753a0deccf588578a2875b8bac40d02bd34129
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DOMNotificationRouter.NO_LISTENERS 76/109176/2
Robert Varga [Wed, 6 Dec 2023 16:39:24 +0000 (17:39 +0100)]
Clean up DOMNotificationRouter.NO_LISTENERS

Use Futures.immediateFuture() with Empty.value() to reduce reliance on
FluentFuture and null values.

Change-Id: I8233a4227e38753531994c13feb9e580c03f66d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DOMNotificationPublishService.REJECTED 75/109175/2
Robert Varga [Wed, 6 Dec 2023 16:38:23 +0000 (17:38 +0100)]
Clean up DOMNotificationPublishService.REJECTED

Reduce qualifier from <Object> to <?>, so that the value remains
completely opaque. Also add a @NonNull annotation.

Change-Id: I99d0e04327bcf9b67ec6b1f760e2dec24fc70ffa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up DOMNotificationRouter 74/109174/2
Robert Varga [Wed, 6 Dec 2023 16:30:55 +0000 (17:30 +0100)]
Clean up DOMNotificationRouter

Remove create() method, as it has been deprecated long time ago.

Also use local variable type inference to reduce verbosity and adjust
tests to use try-with-resources.

Change-Id: Ibccaeeabb19d7f2e3440246dac62c2175817c030
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove Naming.NOTIFICATION_LISTENER_SUFFIX 73/109173/1
Robert Varga [Wed, 6 Dec 2023 16:17:30 +0000 (17:17 +0100)]
Remove Naming.NOTIFICATION_LISTENER_SUFFIX

This constant was used only by aggregate NotificationListeners, remove
it.

JIRA: MDSAL-497
Change-Id: I2be5a92934e5bccb7816ee2d95acc8044e7066a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove Naming.RPC_SERVICE_SUFFIX 72/109172/1
Robert Varga [Wed, 6 Dec 2023 16:15:36 +0000 (17:15 +0100)]
Remove Naming.RPC_SERVICE_SUFFIX

This constant was only used for ynag.binding.RpcService implementations,
remove it.

JIRA: MDSAL-772
Change-Id: I0b222743c8466e55cdfedd9974046dcfaaf37673
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoClean up BindingDOMNotificationPublishServiceAdapter 71/109171/1
Robert Varga [Wed, 6 Dec 2023 16:13:55 +0000 (17:13 +0100)]
Clean up BindingDOMNotificationPublishServiceAdapter

Remove deprecated method and address the two FIXMEs which are long
overdue.

Change-Id: I27354cd2d530268473236ba823afec162bfd2cc3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove deprecate DOMRpcResult methods 70/109170/1
Robert Varga [Wed, 6 Dec 2023 16:11:28 +0000 (17:11 +0100)]
Remove deprecate DOMRpcResult methods

getErrors() and getResult() were deprecated in previous major release,
remove them now.

Change-Id: I234c649dcd45e9b4ac38c7d5415de64249e95db9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove deprecated constructor 69/109169/1
Robert Varga [Wed, 6 Dec 2023 13:50:55 +0000 (14:50 +0100)]
Remove deprecated constructor

We require only a simple Executor, simplify things accordingly.

Change-Id: I94b89d2b7bf4d7cee65a30cf4635a01923b6db61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRemove SuppressFBWarnings from InstanceIdentifier 55/109055/1
Robert Varga [Fri, 24 Nov 2023 15:00:17 +0000 (16:00 +0100)]
Remove SuppressFBWarnings from InstanceIdentifier

Define readObject()/writeObject() methods that enforce Serializable
Proxy pattern, which in turn silences SpotBugs.

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