Remove deprecated MD-SAL APIs The APIs in controller have been deprecated for removal and cannot sustain an upgrade to Guava-28+. Remove them along with all supporting implementations. JIRA: CONTROLLER-1903 Change-Id: I213797b7045cfd7bef744e249614e2b1f6169c1c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Deprecate old MD-SAL APIs for removal These APIs are slated for removal in Aluminium, make sure our warning is more stern. JIRA: CONTROLLER-1917 Change-Id: Ib4f7dcfd5183b87dd10b9ce2b773a59a548892c9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump odlparent to 6.0.0 This bumps odlparent to 6.0.0 as part of Magnesium MRI. Change-Id: I084c6a32c4facafd85e3b87c6d8a9a29a33848a8 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Suppress modernization Modernize as much as possible, but as we have legacy APIs in play, we have to add also some suppressions. Change-Id: I844821f129ad0bb0e186b6a4848a6d2937513f7b Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate from YangInstanceIdentifier.EMPTY This migrates to the replacement empty() method. Change-Id: I32ca026a33835edb16f8e1e6142e9192c880076b Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix modernization issues This fixes issues pointed out by Modernizer, which mostly boil down to using Objects.requireNonNull() and direct java.util collections. Change-Id: Id32530a6722cd101f96c23f6a745f91b2f09e2f9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Move createProxy() This is a simple internal method, inline it. Change-Id: I5568f95f31c2487441fb19dbf3d33e02de5ada2a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fixup checkstyle Updated checkstyle does not like some our docs, fix them up. Change-Id: I2d4f608fe9c44a56cdcac511cc1e2ae75c03b413 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove BindingToNormalizedNodeCodec service export This service is not used anywhere (not should it be), remove it. Change-Id: I841065ff4932c4d56ca20bd3c465da4fe814216c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Deprecate all MD-SAL APIs These APIs have either been completely deprecated or have their replacements in the mdsal project. Mark all of them as deprecated, including their implementations. JIRA: CONTROLLER-1902 Change-Id: I903afcef57c70c1013ab479cfcf31a42f475dc0f Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump mdsal to 4.0.1 Upgrade mdsal to 4.0.1 and remove most references to Javassist and its associated streamer implementation. Change-Id: Ia9dc2c886217f1c353db6523b654e993ed9a397a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix memory leak in BA mount service The cache used in BA mount service uses weakKeys() so the keys (DOM mountpoint) could be GCed when no ono, except cache, referenced them). However the values in the cache (BA mountpoint) also kept a reference to the key, so the key was never weakly reachable and thus never GCed resulting in a memory leak. Which is especially visible in case of frequent reconnects of netconf mountpoints where after every reconnect a new DOM mountpoint is created, requiring a new BA mountpoint creating new entry in the cache of BA mount service... Added also a simple test verifying proper cache cleanup Change-Id: I9c109dd6d499d6185842d6a1ad5a59d75565af5c Signed-off-by: Maros Marsalek <mmarsalek@frinx.io>
Bump mdsal to 4.0.0 This bumps mdsal to 4.0.0, adjusting for changes it brings, notably: - FluentFuture removed from DOM RPC invocation services - ping-pong functionality directly part of DOMDataBroker API and not via a dedicated DOMDataBroker instance - DataContainer.getImplementedInterface() renamed to implementedInterface() - DOMBrokerReadWriteTransaction.close() method being removed - BindingCodecTreeNode being refactored Change-Id: I5af13aa82036373826291a54661f7fd20ff387c3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump yangtools to 3.0.0 This is bumps yangtools to 3.0.0, adjusting for changed APIs. The changes specifically include: - use ListenerRegistry.getRegistrations() instead of it implementing Iterable - adjust for NormalizedNodeStreamWriter interface change - remove use of *AttrBuilder, as NormalizedNodes no longer hold attributes - DataTreeCandidateNodes.empty() instead of home-grown implementation - adjust for DataTreeCandidateNode.getModifiedChild() returning Optional - use QueuedNotificationManager.BatchedInvoker Change-Id: Ia30d73ccf6380e3759414b3026b822df0950a481 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix logging arguments Upgraded spotbugs is finding these violations, fix them up. Change-Id: I6f7490cd1d48c6e22d048842265bf71d0ff24afc Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Reduce JSR305 proliferation retention=runtime annotations are mixing really badly with Java EE injection and Java 11. Make sure we do not use javax.annotation package in APIs and reduce overall proliferation inside implementations. Change-Id: I569815f0336efdc0de662c3b80f0fa6e5dd47d8a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Account for reported UNMODIFIED nodes DataObjectModification has no way of expressing UNMODIFIED nodes, but they can (and are) reported from DataTreeCandidateNode, hence we end up reporting IllegalStateException when the user tries to look at those nodes. Make sure we take the node under consideration and do not report unmodified children, hence preventing the ISE from happening. JIRA: MDSAL-422 Change-Id: I34d36ae083c5ce3ad793eb584236f175f7a3a906 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Move BP xml files to standard OSGI-INF/blueprint We originally used org/opendaylight/blueprint in case we needed to customize how BP bundles are processed but this wasn't needed. So let's move to the standard BP dir. We'll keep the BlueprintBundleTracker as is for backwards compatibility - the only change was to modify it to look in both dirs for BP xml files when restarting the container for a bundle. Change-Id: I777e831ef4d8293b49d7aa6c8cdecec96b97937f Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Use Method.getParameterCount() Java 8 introduced this method, which bypasses array cloning done by getParameterTypes(), making it more efficient. Take advantage of it. Change-Id: I130a58c8ca667e57ae29c99abdd8066d8ca7dbd7 JIRA: MDSAL-398 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Introduce ReadTransaction.exists() This method exists in the DOM API, but for some reason it was left out if the Binding API. Introduce it as default methods riding on the read() method and override them in all known implementations, so the request is efficiently routed. JIRA: MDSAL-389 Change-Id: Id56332d6f720396305ac68e40554e62fd17c34fb Signed-off-by: Robert Varga <robert.varga@pantheon.tech>