mdsal.git
6 months agoBump upstreams 96/113896/1
Robert Varga [Tue, 8 Oct 2024 12:36:36 +0000 (14:36 +0200)]
Bump upstreams

Adopt:
- odlparent-13.1.5
- yangtools-11.0.8

Change-Id: I8bfa75068d9247561dd68cd0427217b520bee1f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoBump byte-buddy to 1.15.3 83/113883/1
Robert Varga [Tue, 1 Oct 2024 07:26:02 +0000 (09:26 +0200)]
Bump byte-buddy to 1.15.3

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

Change-Id: Ifdccd721735a883242a3caea85a159e9a1b76671
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e939bada7279eec53200c38ae40053bd99799ce0)

6 months agoBump byte-buddy to 1.15.2 82/113882/1
Robert Varga [Fri, 27 Sep 2024 15:12:15 +0000 (17:12 +0200)]
Bump byte-buddy to 1.15.2

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

Change-Id: Ib02a9165a8d22462b0118e42abc47746b01ed451
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 628946054251e46a3088a105ae67677d593edd37)

7 months agoExpose BindingDataContainerWriter 50/113650/2
Robert Varga [Fri, 13 Sep 2024 14:50:02 +0000 (16:50 +0200)]
Expose BindingDataContainerWriter

We somehow lost the ability to emit stream events directly into a
NormalizedNodeStreamWriter. This patch restores it.

JIRA: MDSAL-870
Change-Id: Id8f517c3534ec2dc64c2046462648fab4e849cae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0c7683c58b49415e20d56a463337f8dd07739ae9)

7 months agoBump Xtend to 2.36.0 47/113647/1
Robert Varga [Tue, 24 Sep 2024 10:47:55 +0000 (12:47 +0200)]
Bump Xtend to 2.36.0

https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/02/27/version-2-34-0
https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/05/28/version-2-35-0
https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/08/25/version-2-36-0

Change-Id: Ie5a8c927aa3d2386418911088f2a45aec485a421
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 21c2912832f6b6adc6fd764d837efcead9028947)

7 months agoBump byte-buddy to 1.15.1 46/113646/1
Robert Varga [Fri, 30 Aug 2024 12:42:00 +0000 (14:42 +0200)]
Bump byte-buddy to 1.15.1

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

Change-Id: Ic780564d53b504190fc111b0cbb761af56057257
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e670880d1c423cfa1dc58187f03887fbd8e88179)

7 months agoRemove RpcInputCodec 24/113524/1
Robert Varga [Fri, 13 Sep 2024 14:40:01 +0000 (16:40 +0200)]
Remove RpcInputCodec

This interface used to have two unrelated implementations, but it only
has a single implementation now. Remove it to simplify things slightly.

Change-Id: I542e131e05f6a846ee1d8ba33d25e74744d9dc92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 59dd5f04d2a7ed01371e87ed334b6c8fb0a1a4bc)

7 months agoDataObjectCodecContext.serialize() should be final 23/113523/1
Robert Varga [Fri, 13 Sep 2024 14:38:46 +0000 (16:38 +0200)]
DataObjectCodecContext.serialize() should be final

We do not override this method anywhere, make sure to enforce it by
making it final.

Change-Id: Ia74c8625aca997e12ca80c046469dba1756d5818
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 334e53497e77d491730301b323c297e83ad76dca)

8 months agoAdd mdsal.common.api.OnCommitCallback 47/113247/1
Robert Varga [Thu, 1 Aug 2024 22:57:41 +0000 (00:57 +0200)]
Add mdsal.common.api.OnCommitCallback

This callback expresses the error conditions exactly, something that
cannot be propagated in a type-safe manner through ListenableFuture.

Also add OnCommitFutureCallback, which maps the exceptions in a manner
similar to ExceptionMapper.

Finally enrich (DOMDataTree)WriteTransaction with methods which take
this callback and use these methods.

JIRA: MDSAL-865
Change-Id: Ia93de64be17486016f64a0877b2cdd5245da433d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d1d238c3b3a23e9baf04b26c96d31710ccefd15a)
(cherry picked from commit 93430c21ecb05ea815418050b5d64f778db4c601)

8 months agoBump byte-buddy to 1.15.0 40/113240/1
Robert Varga [Sun, 25 Aug 2024 05:52:29 +0000 (07:52 +0200)]
Bump byte-buddy to 1.15.0

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

Change-Id: I734f095e9f397b113979a8863101e6d1ab375d07
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2b53d4cf8e0d74015c9f3fdc31f5eeb905d0cbe1)

9 months agoImprove BindingClassLoader.toString() and equality 09/112809/1
Robert Varga [Thu, 1 Aug 2024 22:23:20 +0000 (00:23 +0200)]
Improve BindingClassLoader.toString() and equality

Improve BindingClassLoader.toString(), so that we:
- retain identity information, but use a consistent HexFormat string
- expose parent ClassLoader
- expose target from LeafBindingClassLoader

Also codify that a BindingClassLoader operates on object identity, so
there is no confusion about that fact, ever.

Change-Id: I1c9f968ff1e1bf4b4fc5b2a4a5dc64544f7ecfed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2d59036ee09b33195ac01a24913393bc1e541eb8)

9 months agoBump byte-buddy to 1.14.18 65/112965/1
Robert Varga [Thu, 1 Aug 2024 22:04:02 +0000 (00:04 +0200)]
Bump byte-buddy to 1.14.18

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

Change-Id: I254abd8ce16277c191cd7c2dd93eba49aaca8916
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 18ba943dfea1374ac0fe2b4705ade8b54f5f5bd1)

9 months agoFix compareAndExchange() check 63/112963/1
Robert Varga [Thu, 1 Aug 2024 18:51:04 +0000 (20:51 +0200)]
Fix compareAndExchange() check

The witness value should be checked against 'local', as that is what we
expect.

Change-Id: Ie4e264e0b978e2cc9557e01e23f8200a4fe4febc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2213ad43f30967799d71a45fbd1a48082c78174a)

9 months agoImprove RootBindingClassLoader logging 62/112962/1
Robert Varga [Thu, 1 Aug 2024 18:49:00 +0000 (20:49 +0200)]
Improve RootBindingClassLoader logging

Log isOurClass() exceptions on trace level to pollution. Add debugs
to point out which class loader we are using for which class.

Change-Id: I9f8eeab0e1fb222d2b40daba51eb7c86cf156d96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 46935172a56fe4e66ff8339a48544f19a0a4eaf6)

9 months agoFix a nullness warning in RootBindingClassLoader 61/112961/1
Robert Varga [Thu, 1 Aug 2024 18:41:42 +0000 (20:41 +0200)]
Fix a nullness warning in RootBindingClassLoader

We have local which we may end up returning not marked as @NonNull. Fix
that.

Change-Id: Idbf59b005c5c5e4b2816d4474966af804bb786ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 54b74e225b306dd1d16f908b942401c43678aa50)

11 months agoBump versions to 12.0.7-SNAPSHOT 73/111973/1
Robert Varga [Tue, 4 Jun 2024 09:00:08 +0000 (11:00 +0200)]
Bump versions to 12.0.7-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia177be9a4ad64a4c4ef0be2dc7d578a72a7b8df3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRelease mdsal v12.0.6
jenkins-releng [Mon, 3 Jun 2024 22:04:33 +0000 (22:04 +0000)]
Release mdsal

11 months agoBump upstreams 60/111960/1
Robert Varga [Mon, 3 Jun 2024 20:58:12 +0000 (22:58 +0200)]
Bump upstreams

Adopt:
- odlparent-13.1.3
- yangtools-11.0.7

Change-Id: I82a156c9b7bcf795c74ab602f7472c952044b759
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoFixup checkstyle 59/111959/1
Robert Varga [Mon, 15 Apr 2024 11:56:12 +0000 (13:56 +0200)]
Fixup checkstyle

Upgraded checkstyle is finding more violations, fix them up.

Change-Id: I96ab46cc8f370b39dd287d3a1717952a5685dce5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2ebd1ffea30f1bcb7bce58fe05c6ede52e28dbcd)

11 months agoFix mdsal-dom-spi dependencies 58/111958/1
Robert Varga [Tue, 28 May 2024 18:44:54 +0000 (20:44 +0200)]
Fix mdsal-dom-spi dependencies

We should be pulling in checker-qual to express our dependency on it.

Change-Id: I294a62447467721aa98f2a8a3a079800836c2b7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b9d965d6dbca8195275459ceaa44aee655e35818)

11 months agoBump java-diff-utils to 4.12 57/111957/1
Robert Varga [Mon, 3 Jun 2024 14:28:29 +0000 (16:28 +0200)]
Bump java-diff-utils to 4.12

https://github.com/java-diff-utils/java-diff-utils/releases/tag/java-diff-utils-parent-4.12

Change-Id: I64a9794c9951384db099fa43eca3804cecf86b54
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4ad000b3415f9efdb71be86da9f425b67b846504)

11 months agoBump byte-buddy to 1.14.17 56/111956/1
Robert Varga [Mon, 3 Jun 2024 14:20:20 +0000 (16:20 +0200)]
Bump byte-buddy to 1.14.17

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

Change-Id: Iec4fe66d3a8f926f52421b20364ebcb76a364873
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 20f3348eaec3506a28de9da7f047fdebfe92915f)

11 months agoBump byte-buddy to 1.14.16 79/111879/1
Robert Varga [Sun, 26 May 2024 18:31:57 +0000 (20:31 +0200)]
Bump byte-buddy to 1.14.16

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

Change-Id: I987eb66134bbf702580d0b837a664ee14b443cda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 35343e8e4cd2b77d49215e1f5f3b582301a18360)

11 months agoBump byte-buddy to 1.14.14 78/111878/1
Robert Varga [Sat, 4 May 2024 23:27:23 +0000 (01:27 +0200)]
Bump byte-buddy to 1.14.14

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

Change-Id: I9671ab7cf13ec91f442bba30f4d05001a0cecc23
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit db0da78ea6a85fcf2f063b321cc6bf69a9d0e354)

12 months agoBump byte-buddy to 1.14.13 26/111426/1
Robert Varga [Mon, 15 Apr 2024 15:49:05 +0000 (17:49 +0200)]
Bump byte-buddy to 1.14.13

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

Change-Id: Ice0b25336f356c6ec6e0e6ea38994ee873548436
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 71c011a77d03be430badc7bbf789253b22713dd9)

13 months agoBump versions to 12.0.6-SNAPSHOT 63/110863/1
Robert Varga [Tue, 19 Mar 2024 11:14:42 +0000 (12:14 +0100)]
Bump versions to 12.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I4359b4fc410a06dda41890e95e9d5caf08197d1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRelease mdsal v12.0.5
jenkins-releng [Tue, 19 Mar 2024 08:11:55 +0000 (08:11 +0000)]
Release mdsal

13 months agoBump upstreams 60/110860/1
Robert Varga [Tue, 19 Mar 2024 07:23:29 +0000 (08:23 +0100)]
Bump upstreams

Adopt:
- odlparent-13.0.11
- yangtools-11.0.6

Change-Id: I720c6108441c0d7ae2cc64150b9ead51734c880f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoAdd RTD documentation 37/110537/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>
(cherry picked from commit 34f3f2d9da54f39a9ec47f613d9b52961b1173fe)

14 months agoBump byte-buddy to 1.14.12 68/110468/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>
(cherry picked from commit 870e09f2d8fb0cb2b5fb50192fe7efea3370fa1b)

14 months agoDo not generate prime when not needed 20/110320/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>
(cherry picked from commit 37ba772acba4cf4f56e3814c073c64f096f94d02)

14 months agoImprove RpcProviderService.registerRpcImplementations() 21/110221/1
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>
(cherry picked from commit b36a95a80b1d42191d070beb376a2495d8fd1923)

15 months agoClean up constant reference 62/109862/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)

15 months agoCommitInfo forward compatibility 43/109843/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>
(cherry picked from commit 730b24538dfa113ea18ab874d932d5726aef96ce)

15 months agoCapture collection type class 44/109844/2
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>
(cherry picked from commit 2840f8a13a244834a831614d96a1411b3add3286)

15 months agoOverride Rpc/Action invoke method 42/109842/1
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>
(cherry picked from commit 078d561c79e3fcf57b2bfd5d6b50c4502288781a)

15 months agoUse Locale.ROOT for toUpperCase 41/109841/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>
(cherry picked from commit f2572480048c7d2017ee88f65a22b2eabe0dd46b)

16 months agoBump byte-buddy to 1.14.11 65/109465/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>
(cherry picked from commit c3613aa89ab5619abc59ac6e0e6890a9041249c7)

16 months agoBump versions to 12.0.5-SNAPSHOT 43/109443/1
Robert Varga [Thu, 28 Dec 2023 20:05:11 +0000 (21:05 +0100)]
Bump versions to 12.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: Ic5ec8f0870a16c1860d1f2c924ff5591f22ef1d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRelease mdsal v12.0.4
jenkins-releng [Thu, 28 Dec 2023 11:36:56 +0000 (11:36 +0000)]
Release mdsal

16 months agoRemove SuppressFBWarnings from InstanceIdentifier 40/109440/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>
(cherry picked from commit 32bc2210ab6b6fcc6b7c5459d86352006250414a)

16 months agoFix wrong annotation use 36/109436/1
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>
(cherry picked from commit f052b186f3f1c7c314ab71a8cd0b4df4c00fda1e)

16 months agoMove binding.model.api documentation 35/109435/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>
(cherry picked from commit e71e1be48c76398867c75d098e00b76ddf271cd8)

16 months agoSkip SpotBugs for generated code 34/109434/1
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>
(cherry picked from commit e04be15a9540ad113a48aa1f08c8382813cf882b)

16 months agoBump upstreams 23/109423/4
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>
(cherry picked from commit 9f23891d96e635e1cd30c699f9b72b9336fc9d06)

16 months agoUse constructor injection in mdsal-singleton-dom-impl 33/109433/1
Robert Varga [Thu, 28 Dec 2023 08:40:13 +0000 (09:40 +0100)]
Use constructor injection in mdsal-singleton-dom-impl

Upgraded SpotBugs complains about
UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR, fix that by using constructor
injection.

Change-Id: I812feea91e0a13e7978d4d89b2ca2ee863c2187d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoUse constructor injection in mdsal-replicate-netty 32/109432/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>
(cherry picked from commit e60ce63d3a25e6138fd04297ac370109ac8d4909)

16 months agoUse constructor injection for OSGi codec services 31/109431/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>
(cherry picked from commit d3c0035fc97dea4008850d58fd719c41af1265ca)

16 months agoUse constructor injection in OSGiDOMSchemaService 32/108932/2
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>
(cherry picked from commit 18cc77eca8b2440cb8c1f22db62c845c6fd7b9ae)

16 months agoDo not leak SpotBugs from yang-binding 31/108931/1
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>
(cherry picked from commit 99dd61f2037307d1b59f72a47e89d845f138acde)

16 months agoClean up DataTreeIdentifier a bit 73/109273/1
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>
(cherry picked from commit ccf116abaf3eb6615f9391344ab692fb9734f2ff)

16 months agoUse compareAndExchange() to set closeFuture 72/109272/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>
(cherry picked from commit b61b30a4b2be38c8629bf9c5d66d05609db3be1c)

16 months agoAdd (DOM)DataTreeIdentifier serialization proxies 71/109271/1
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>
(cherry picked from commit 9286037f2852d197c4384511fce97c551e2b8dc3)

16 months agoMake sure listeners are immutable 04/109204/1
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>
(cherry picked from commit 6278245ab37ad9764d4a88c337e8a87631d2c5c9)

16 months agoBump Xtend to 2.33.0 03/109203/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>
(cherry picked from commit 6b482af5ec8675f46684edca113ea9df8c099383)

18 months agoBump versions to 12.0.4-SNAPSHOT 59/108759/1
Robert Varga [Mon, 30 Oct 2023 21:21:28 +0000 (22:21 +0100)]
Bump versions to 12.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I22fefd3c8ae76998cd879391b322adeb61a0c9b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump upstreams 52/108752/1
Robert Varga [Mon, 30 Oct 2023 16:12:11 +0000 (17:12 +0100)]
Bump upstreams

Adopt:
- odlparent-13.0.7
- yangtools-11.0.4

Change-Id: Iaa314dfdca3513a67d9a1b8cb895554172071441
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMake LambdaTarget a record 81/108581/3
Robert Varga [Sat, 21 Oct 2023 03:43:30 +0000 (05:43 +0200)]
Make LambdaTarget a record

We have a FIXME for efficiency improvement, address it.

Change-Id: If09bdb15b83b5e83114435456f4e4d1df4344e0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMigrate rfc6991-ietf-yang-types to JUnit5 02/108502/1
Robert Varga [Wed, 18 Oct 2023 16:08:52 +0000 (18:08 +0200)]
Migrate rfc6991-ietf-yang-types to JUnit5

We have a single test here, which is trivial to migrate.

Change-Id: I871dc1813c59159300c9561a539cce299d7e8700
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMigrate rfc6991-ietf-inet-types to JUnit5 01/108501/1
Robert Varga [Wed, 18 Oct 2023 16:04:42 +0000 (18:04 +0200)]
Migrate rfc6991-ietf-inet-types to JUnit5

This is a trivial migration, except we also migrate hamcrest assertions
to assertInstanceOf().

Change-Id: I812ec1c4a885c9912afea41135ed767ce6436c0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMigrate ietf-type-util to JUnit5 00/108500/1
Robert Varga [Wed, 18 Oct 2023 15:57:41 +0000 (17:57 +0200)]
Migrate ietf-type-util to JUnit5

This is a straightforward automated conversion.

Change-Id: I307c021985090c59e8d41fc833427c0da9e7842f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix links in README 38/106938/4
matus.matok [Thu, 20 Jul 2023 07:26:31 +0000 (09:26 +0200)]
Fix links in README

Fixed the links in README.md to use the correct markdown syntax.

JIRA: MDSAL-832
Change-Id: Iba195c6ee9191480b8cfb4c888fb82904ba3f37a
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
18 months agoBump byte-buddy to 1.14.9 75/108475/1
Robert Varga [Tue, 17 Oct 2023 12:18:08 +0000 (14:18 +0200)]
Bump byte-buddy to 1.14.9

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

Change-Id: I254907a6467e8d3d76d165bd4f3c22a379545eb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoAdd docs for model registration with OSGi 86/104986/13
Šimon Ukuš [Wed, 22 Mar 2023 14:43:40 +0000 (15:43 +0100)]
Add docs for model registration with OSGi

JIRA: MDSAL-9
Change-Id: Id0c6c2071c14977caad31743253bbae8b6436755
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
19 months agoBump upstreams 08/108108/2
Robert Varga [Sun, 1 Oct 2023 23:29:00 +0000 (01:29 +0200)]
Bump upstreams

Adopt:
- odlparent-13.0.5
- yangtools-11.0.3

Change-Id: Ic5ae3e0bfa2359087ad4c8818794746489ab2e20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoFix NotificationListenerInvokerTest on Java 19+ 64/108064/1
Robert Varga [Fri, 29 Sep 2023 16:03:18 +0000 (18:03 +0200)]
Fix NotificationListenerInvokerTest on Java 19+

We cannot mock MethodHandle, as it is a sealed class on Java 19+. Adjust
the test to use String.toString() as the source of the MH.

Change-Id: Ieab28fdec5c703c2fcad8b14cd95ea3f49bd2a21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump versions to 12.0.3-SNAPSHOT 98/107898/1
Robert Varga [Sun, 17 Sep 2023 11:53:18 +0000 (13:53 +0200)]
Bump versions to 12.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Id25ee91d56adadb4dda0b0dbb57555a5f0a31b7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoRelease mdsal v12.0.2
jenkins-releng [Sun, 17 Sep 2023 09:11:11 +0000 (09:11 +0000)]
Release mdsal

19 months agoBump byte-buddy to 1.14.8 91/107891/1
Robert Varga [Sat, 16 Sep 2023 11:11:17 +0000 (13:11 +0200)]
Bump byte-buddy to 1.14.8

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

Change-Id: Ica0c4632f81b6d11303409303ebe30245b63cc22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump yangtools to 11.0.2 90/107890/1
Robert Varga [Sat, 16 Sep 2023 11:10:35 +0000 (13:10 +0200)]
Bump yangtools to 11.0.2

Pick up fixes and improvements from upstream.

Change-Id: I25d4724ac546438db4470925bb73e30c7f9cccea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoMake AbstractPingPongTransactionChain.close() idempotent 76/107676/2
Robert Varga [Sun, 3 Sep 2023 19:59:41 +0000 (21:59 +0200)]
Make AbstractPingPongTransactionChain.close() idempotent

Expend one byte of state to track close() method, making sure it is
idempotent.

JIRA: MDSAL-838
Change-Id: Ie7bccb2c12ad9eadd948fc15244cc2b2b150a256
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoMigrate callers of deprecated DataTreeCandidateNode methods 77/107677/1
Robert Varga [Sun, 3 Sep 2023 20:13:23 +0000 (22:13 +0200)]
Migrate callers of deprecated DataTreeCandidateNode methods

DataTreeCandidateNode has deprecated a number of methods, migrate its
callers.

Change-Id: Ie190e4bfa6c4e37c3f242d9b6220a5dcc9e3d20d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoMigrate mdsal-dom-api to JUnit5 01/107601/4
Robert Varga [Wed, 30 Aug 2023 17:52:31 +0000 (19:52 +0200)]
Migrate mdsal-dom-api to JUnit5

Migrate and clean up tests.

Change-Id: Id437ae4ca4e93ca2b8ec38ed46a760fe2db4d157
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoMigrate mdsal-common-api to JUnit5 02/107602/3
Robert Varga [Wed, 30 Aug 2023 19:19:39 +0000 (21:19 +0200)]
Migrate mdsal-common-api to JUnit5

This is mostly a trivial conversion, but we also expand the test suite
to increase coverage and assertions.

Change-Id: I6ad81c99cc153e2fee3cd937dba42371a98ea047
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoMigrate mdsal-binding-api to JUnit5 00/107600/2
Robert Varga [Wed, 30 Aug 2023 17:35:26 +0000 (19:35 +0200)]
Migrate mdsal-binding-api to JUnit5

Remove DataObjectModificationTest and migrate other tests to use JUnit5.

Change-Id: Ie341ae97344066a0627225e7ee56162bc27927ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump versions to 12.0.2-SNAPSHOT 99/107599/1
Robert Varga [Wed, 30 Aug 2023 19:26:19 +0000 (21:26 +0200)]
Bump versions to 12.0.2-SNAPSHOT

This starts the next developement iteration.

Change-Id: I1cab2e06404eb6de3fb589fb07ba34f1695f98b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoRelease mdsal v12.0.1
jenkins-releng [Wed, 30 Aug 2023 14:41:47 +0000 (14:41 +0000)]
Release mdsal

20 months agoBump upstreams 84/107584/2
Robert Varga [Wed, 30 Aug 2023 12:07:25 +0000 (14:07 +0200)]
Bump upstreams

Adopt:
- odlparent-13.0.4
- yangtools-11.0.1

Change-Id: I292e6adbf213017d4dc9316e32ba60111ad7e60b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoFix mdsal-binding-dom-adapter checkstyle 83/107583/1
Robert Varga [Wed, 30 Aug 2023 13:06:45 +0000 (15:06 +0200)]
Fix mdsal-binding-dom-adapter checkstyle

Upgraded checkstyle is finding a few issues, fix them up.

Change-Id: Ifdafb339f112749b891ef288420e28af124b306e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoFix mergeParentStructure{Merge,Put} with augmentations 66/107566/4
Robert Varga [Wed, 30 Aug 2023 08:35:26 +0000 (10:35 +0200)]
Fix mergeParentStructure{Merge,Put} with augmentations

We need to pay attention to the result of normalization, as
AugmentationResult points to the parent YangInstanceIdentifier --
and hence we should just use it instead of peeling its last component.

JIRA: MDSAL-837
Change-Id: I7f108a6dff96a010f029b38b2cbba5548551b56e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoClean up dependencies 72/107572/1
Robert Varga [Wed, 30 Aug 2023 09:47:20 +0000 (11:47 +0200)]
Clean up dependencies

We have quite a few warnings about used undeclared dependencies, clean
them up.

Change-Id: I768629694f426f99aaa32a53d19b18642b88a0bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoSplit out OperationInvocation 65/107565/2
Robert Varga [Tue, 29 Aug 2023 19:11:37 +0000 (21:11 +0200)]
Split out OperationInvocation

This should be a top-level class, even when it is a utility. Changes the
logger identity, but fixes a Sonar warning.

Change-Id: Id7777ac73b8e765df86349384f5f911f48562c00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoQualify nested interfaces 64/107564/1
Robert Varga [Tue, 29 Aug 2023 18:59:56 +0000 (20:59 +0200)]
Qualify nested interfaces

Fix Sonar warnings stemming from differing import policies:
Eclipse requires these references to be imported, whereas Sonar flags
them.

Use qualified refernces to eliminate the ambiguity.

Change-Id: Iac509fdd28b7520220a9f171b0d5fff0df306663
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoMerge if() statements 63/107563/1
Robert Varga [Tue, 29 Aug 2023 18:58:51 +0000 (20:58 +0200)]
Merge if() statements

There is no point in having nested if() statements, merge them,
eliminating a Sonar warning.

Change-Id: I9a1e325c6366446858fe47fd4956d0754f9b9f19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBind to org.eclipse.jdt.annotation 62/107562/1
Robert Varga [Tue, 29 Aug 2023 18:57:32 +0000 (20:57 +0200)]
Bind to org.eclipse.jdt.annotation

We are using these annotations with scope=compile, hence we can safely
binding to the classes at runtime. Fixes a few Sonar warnings.

Change-Id: I793b847d9d25086e32158f333d8c5c155e554568
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump xtend to 2.32.0 50/107550/1
Robert Varga [Tue, 29 Aug 2023 07:06:32 +0000 (09:06 +0200)]
Bump xtend to 2.32.0

https://eclipse.dev/Xtext/xtend/releasenotes.html#/releasenotes/2023/08/27/version-2-32-0

Change-Id: I1179a8129e379fe833a6e6487d22d6c7abad5362
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump byte-buddy to 1.14.7 27/107527/1
Robert Varga [Mon, 28 Aug 2023 11:43:11 +0000 (13:43 +0200)]
Bump byte-buddy to 1.14.7

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

Change-Id: Ia547a6bc735f5efa6d0420dc0261442f077e815d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoRemove CommonDataObjectCodecContext.namespace() 53/106853/1
Robert Varga [Mon, 10 Jul 2023 12:14:27 +0000 (14:14 +0200)]
Remove CommonDataObjectCodecContext.namespace()

This method is not used anywhere, remove it. This cascades to
CommonDataObjectCodecPrototype.getNamespace(), which is also unused and
removed -- trimming down the overall memory cost and the need to make up
a namespace.

Change-Id: Iefe432de785d0c7400dd5be87797c849e56c2f9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUnify yangPathArgumentChild() 52/106852/3
Robert Varga [Mon, 10 Jul 2023 11:42:31 +0000 (13:42 +0200)]
Unify yangPathArgumentChild()

We have two implementations which are doing essentially the same thing
-- except ChoiceCodecContext performs lookup twice. Reduce the amount of
codec duplication.

JIRA: MDSAL-805
Change-Id: I834bf66d92f8bf3ad8621be28ba3fbb39f52f9fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUnify streamChild() implementations 51/106851/2
Robert Varga [Mon, 10 Jul 2023 11:27:33 +0000 (13:27 +0200)]
Unify streamChild() implementations

The two implementations we have perform essentially the same thing, tie
them together.

JIRA: MDSAL-805
Change-Id: I303ae152987b4d478862874b4d9ee3fc8db4f7db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoRevert "Convert model.ietf.rfc8040 to JPMS" 45/106845/2
Robert Varga [Mon, 10 Jul 2023 08:03:04 +0000 (10:03 +0200)]
Revert "Convert model.ietf.rfc8040 to JPMS"

This reverts commit f22f321bc45e37db18af4d3b1056d6fb24f29943. We are not
ready for this just now.

Change-Id: If9f58fb27747aef2c02bd9e291322d15b7be1ac7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUnify getStreamChild() implementations 49/106849/2
Robert Varga [Mon, 10 Jul 2023 10:00:28 +0000 (12:00 +0200)]
Unify getStreamChild() implementations

We have two implementations, which essentially do the same thing. Unify
them in DataContainerCodecContext.

JIRA: MDSAL-805
Change-Id: I97db0a356c51472a30b206151426921f5ad550cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoFix mdsal-binding-dom-codec dependencies 50/106850/1
Robert Varga [Mon, 10 Jul 2023 11:12:15 +0000 (13:12 +0200)]
Fix mdsal-binding-dom-codec dependencies

We are using JDT annotations, declare that.

Change-Id: I1c4a6d112da9015fb3885e40c33bf27cd31246ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoRemove superfluous documentation 48/106848/2
Robert Varga [Mon, 10 Jul 2023 09:43:40 +0000 (11:43 +0200)]
Remove superfluous documentation

DataContainerCodecContext implements contracts, there is no need to
re-state the same contract.

Change-Id: Ie1694ff61c61933df8811dcc39b23eca41cf6319
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoConvert model.ietf.rfc8040 to JPMS 37/106837/1
Robert Varga [Thu, 6 Jul 2023 00:51:22 +0000 (02:51 +0200)]
Convert model.ietf.rfc8040 to JPMS

Rather than being an automatic module, make this an explicit module.

Change-Id: Ifa58df2d9a3279252a1fb453fc7a3b7b49f1c620
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoRemove PMD/CPD configuration 35/106835/1
Robert Varga [Thu, 6 Jul 2023 00:13:32 +0000 (02:13 +0200)]
Remove PMD/CPD configuration

We do not have PMD/CPD plugins configured, there is no need to disable
them.

Change-Id: I05a7ed5978eb54440b6d6009a9ea26af9b29926e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoDo not require ListeningExecutorService 10/106810/2
Robert Varga [Tue, 4 Jul 2023 19:32:17 +0000 (21:32 +0200)]
Do not require ListeningExecutorService

SerializedDOMDataBroker can easily operate on any Executor with the
help of Futures.submit(). Drop the requirement to have a
ListeningExecutorService and operate on plain Executor.

Change-Id: I5e5bc1f0c7bfa93f443bc18755d48beafc22f7f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoSharpen DataContainerCodecContext generics 59/106759/4
Robert Varga [Thu, 29 Jun 2023 21:31:58 +0000 (23:31 +0200)]
Sharpen DataContainerCodecContext generics

Now that RootCodecContext is gone, we can sharpen T to require
CompositeRuntimeType, eliminating a bit of weirdness.

Change-Id: I9f430ceeaa59baedcb7ea2b0e69ad279964eb6ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoFold RootCodecContext into BindingCodecContext 58/106758/4
Robert Varga [Thu, 29 Jun 2023 20:51:28 +0000 (22:51 +0200)]
Fold RootCodecContext into BindingCodecContext

RootCodecContext exists only for two purposes:
- return for an empty YangInstanceIdentifier lookup
- ease of InstanceIdentifier lookup

In order to fulfill these two roles, it ends up twisting the
BindingDataObjectCodecTreeNode contract in rather nonsensical ways,
preventing a number of further evolutions of the API.

Fold its functionality into BindingCodecContext, eliminating it from the
class hierarchy.

Change-Id: I44a49b78ed9ae418c5c85e48e9441fa1ec1e9862
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoBump versions to 12.0.1-SNAPSHOT 64/106764/1
Robert Varga [Fri, 30 Jun 2023 08:11:01 +0000 (10:11 +0200)]
Bump versions to 12.0.1-SNAPSHOT

This starts the next development iteration.

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