From 5c3ca303746451daa007c4404bbed2b7051095b0 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 9 Jul 2025 11:57:49 +0200 Subject: [PATCH 1/3] Update NIO2 use Use Files.newInputStream() and Path.of(). Change-Id: I8426263410847fd5d4d16f388684f34e5a75057f Signed-off-by: Robert Varga --- .../java/org/opendaylight/daexim/impl/ImportTask.java | 3 +-- impl/src/main/java/org/opendaylight/daexim/impl/Util.java | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/impl/src/main/java/org/opendaylight/daexim/impl/ImportTask.java b/impl/src/main/java/org/opendaylight/daexim/impl/ImportTask.java index 78be3fd..3868732 100644 --- a/impl/src/main/java/org/opendaylight/daexim/impl/ImportTask.java +++ b/impl/src/main/java/org/opendaylight/daexim/impl/ImportTask.java @@ -20,7 +20,6 @@ import com.google.common.collect.Iterables; import com.google.common.collect.ListMultimap; import com.google.gson.stream.JsonReader; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -218,7 +217,7 @@ public class ImportTask implements Callable { LOG.info("No data file for datastore {}, import skipped", type.name().toLowerCase()); } else { for (final File f : dataFiles.get(type)) { - try (InputStream is = new FileInputStream(f)) { + try (InputStream is = Files.newInputStream(f.toPath())) { LOG.info("Loading data into {} datastore from file {}", type.name().toLowerCase(), f.getAbsolutePath()); final var builder = ImmutableNodes.newContainerBuilder() diff --git a/impl/src/main/java/org/opendaylight/daexim/impl/Util.java b/impl/src/main/java/org/opendaylight/daexim/impl/Util.java index e0e20f6..2f76d91 100644 --- a/impl/src/main/java/org/opendaylight/daexim/impl/Util.java +++ b/impl/src/main/java/org/opendaylight/daexim/impl/Util.java @@ -17,7 +17,6 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FilenameFilter; import java.io.IOException; @@ -26,7 +25,6 @@ import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; @@ -91,7 +89,7 @@ public final class Util { private static String getDaeximDirInternal() { final String propFile = interpolateProp(ETC_CFG_FILE, "karaf.etc", "." + File.separatorChar + "etc"); final Properties props = new Properties(); - try (InputStream is = new FileInputStream(propFile)) { + try (InputStream is = Files.newInputStream(Path.of(propFile))) { props.load(is); if (props.containsKey(DAEXIM_DIR_PROP)) { String propVal = props.getProperty(DAEXIM_DIR_PROP); @@ -114,8 +112,8 @@ public final class Util { @VisibleForTesting static Path getDaeximDir(boolean isBooting) { - final var daeximDir = isBooting ? Paths.get(getDaeximDirInternal(), DAEXIM_BOOT_SUBDIR) - : Paths.get(getDaeximDirInternal()); + final var daeximDir = isBooting ? Path.of(getDaeximDirInternal(), DAEXIM_BOOT_SUBDIR) + : Path.of(getDaeximDirInternal()); try { Files.createDirectories(daeximDir); } catch (IOException e) { -- 2.34.1 From 6f013b02837a1066da87c7b0857c30c1e1417158 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 9 Jul 2025 11:48:43 +0200 Subject: [PATCH 2/3] WIP: Bump upstreams Adopt: - odlparent-14.1.0 - infrautils-7.1.4 - yangtools-14.0.14 - mdsal-14.0.13 - controller-11.0.0 - aaa-0.21.0 - netconf-9.0.0-SNAPSHOT JIRA: DAEXIM-19 Change-Id: Ia3dacdd43da5f8a8b4e074d351e741750e1c7664 Signed-off-by: Robert Varga --- .../org/opendaylight/daexim/impl/AkkaNodeNameProvider.java | 6 +++--- artifacts/pom.xml | 2 +- features/daexim-features/pom.xml | 2 +- features/odl-daexim-all/pom.xml | 4 ++-- features/odl-daexim-all/src/main/feature/feature.xml | 2 +- features/odl-daexim/pom.xml | 2 +- features/odl-daexim/src/main/feature/feature.xml | 2 +- features/pom.xml | 2 +- karaf/pom.xml | 2 +- model/pom.xml | 2 +- parent/pom.xml | 6 +++--- pom.xml | 2 +- spi/pom.xml | 2 +- test-model/pom.xml | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/akka-infoprovider-impl/src/main/java/org/opendaylight/daexim/impl/AkkaNodeNameProvider.java b/akka-infoprovider-impl/src/main/java/org/opendaylight/daexim/impl/AkkaNodeNameProvider.java index f7e8eb1..c31ceed 100644 --- a/akka-infoprovider-impl/src/main/java/org/opendaylight/daexim/impl/AkkaNodeNameProvider.java +++ b/akka-infoprovider-impl/src/main/java/org/opendaylight/daexim/impl/AkkaNodeNameProvider.java @@ -8,11 +8,11 @@ */ package org.opendaylight.daexim.impl; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.cluster.Cluster; import javax.inject.Inject; import javax.inject.Singleton; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.Cluster; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.daexim.spi.NodeNameProvider; import org.osgi.service.component.annotations.Activate; diff --git a/artifacts/pom.xml b/artifacts/pom.xml index d8d7b41..f825e09 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.0.3 + 14.1.0 diff --git a/features/daexim-features/pom.xml b/features/daexim-features/pom.xml index 82fa734..fe544ea 100644 --- a/features/daexim-features/pom.xml +++ b/features/daexim-features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 14.0.3 + 14.1.0 diff --git a/features/odl-daexim-all/pom.xml b/features/odl-daexim-all/pom.xml index 5c586c0..45f128f 100644 --- a/features/odl-daexim-all/pom.xml +++ b/features/odl-daexim-all/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.0.3 + 14.1.0 org.opendaylight.daexim @@ -34,7 +34,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts pom - 8.0.2 + 9.0.0-SNAPSHOT import diff --git a/features/odl-daexim-all/src/main/feature/feature.xml b/features/odl-daexim-all/src/main/feature/feature.xml index df60efd..45b5d53 100644 --- a/features/odl-daexim-all/src/main/feature/feature.xml +++ b/features/odl-daexim-all/src/main/feature/feature.xml @@ -9,6 +9,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0"> - odl-restconf + odl-restconf diff --git a/features/odl-daexim/pom.xml b/features/odl-daexim/pom.xml index cc30a3e..322537f 100644 --- a/features/odl-daexim/pom.xml +++ b/features/odl-daexim/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.0.3 + 14.1.0 org.opendaylight.daexim diff --git a/features/odl-daexim/src/main/feature/feature.xml b/features/odl-daexim/src/main/feature/feature.xml index 12e3261..20156a8 100644 --- a/features/odl-daexim/src/main/feature/feature.xml +++ b/features/odl-daexim/src/main/feature/feature.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html mvn:org.opendaylight.daexim/daexim-impl/${project.version}/cfg odl-mdsal-binding odl-mdsal-model-rfc6991 - odl-mdsal-broker + odl-mdsal-broker odl-infrautils-ready odl-infrautils-utils diff --git a/features/pom.xml b/features/pom.xml index e29a2a5..6d6f80e 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 14.0.3 + 14.1.0 org.opendaylight.daexim diff --git a/karaf/pom.xml b/karaf/pom.xml index 9df2e64..d0a9028 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent karaf4-parent - 14.0.3 + 14.1.0 org.opendaylight.daexim diff --git a/model/pom.xml b/model/pom.xml index 6b5e7be..730d739 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 14.0.2 + 14.0.13 org.opendaylight.daexim diff --git a/parent/pom.xml b/parent/pom.xml index 88b9a1e..76fbc70 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal bundle-parent - 14.0.2 + 14.0.13 org.opendaylight.daexim @@ -25,13 +25,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.infrautils infrautils-artifacts pom - 7.0.3 + 7.1.4 import org.opendaylight.controller controller-artifacts - 10.0.2 + 11.0.0 pom import diff --git a/pom.xml b/pom.xml index a79e5fe..c755a60 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.0.3 + 14.1.0 diff --git a/spi/pom.xml b/spi/pom.xml index acae246..9071705 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 14.0.3 + 14.1.0 org.opendaylight.daexim diff --git a/test-model/pom.xml b/test-model/pom.xml index 1d0cf80..9a2752c 100644 --- a/test-model/pom.xml +++ b/test-model/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 14.0.2 + 14.0.13 org.opendaylight.daexim -- 2.34.1 From 3f9ecbf48b7d50be7f0b5edae4f2babb34111336 Mon Sep 17 00:00:00 2001 From: jenkins-releng Date: Wed, 9 Jul 2025 10:04:00 +0000 Subject: [PATCH 3/3] Release Validate --- akka-infoprovider-impl/pom.xml | 2 +- artifacts/pom.xml | 2 +- features/daexim-features/pom.xml | 2 +- features/odl-daexim-all/pom.xml | 4 ++-- features/odl-daexim/pom.xml | 2 +- features/pom.xml | 2 +- impl/pom.xml | 2 +- karaf/pom.xml | 2 +- model/pom.xml | 2 +- parent/pom.xml | 2 +- pom.xml | 2 +- spi/pom.xml | 2 +- test-model/pom.xml | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/akka-infoprovider-impl/pom.xml b/akka-infoprovider-impl/pom.xml index 0f78e1f..653940d 100644 --- a/akka-infoprovider-impl/pom.xml +++ b/akka-infoprovider-impl/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim parent - 1.17.0-SNAPSHOT + 1.17.0 ../parent daexim-akka-infoprovider-impl diff --git a/artifacts/pom.xml b/artifacts/pom.xml index f825e09..5a93d21 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim daexim-artifacts - 1.17.0-SNAPSHOT + 1.17.0 pom diff --git a/features/daexim-features/pom.xml b/features/daexim-features/pom.xml index fe544ea..4e5be3c 100644 --- a/features/daexim-features/pom.xml +++ b/features/daexim-features/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim daexim-features - 1.17.0-SNAPSHOT + 1.17.0 feature ODL :: daexim :: ${project.artifactId} diff --git a/features/odl-daexim-all/pom.xml b/features/odl-daexim-all/pom.xml index 45f128f..2e048f6 100644 --- a/features/odl-daexim-all/pom.xml +++ b/features/odl-daexim-all/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim odl-daexim-all - 1.17.0-SNAPSHOT + 1.17.0 feature OpenDaylight :: Daexim :: All @@ -34,7 +34,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts pom - 9.0.0-SNAPSHOT + 9.0.0 import diff --git a/features/odl-daexim/pom.xml b/features/odl-daexim/pom.xml index 322537f..47502bb 100644 --- a/features/odl-daexim/pom.xml +++ b/features/odl-daexim/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim odl-daexim - 1.17.0-SNAPSHOT + 1.17.0 feature OpenDaylight :: daexim (Karaf feature) diff --git a/features/pom.xml b/features/pom.xml index 6d6f80e..c75a3eb 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -16,7 +16,7 @@ org.opendaylight.daexim features-aggregator - 1.17.0-SNAPSHOT + 1.17.0 pom diff --git a/impl/pom.xml b/impl/pom.xml index 3e89422..b7e365d 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim parent - 1.17.0-SNAPSHOT + 1.17.0 ../parent daexim-impl diff --git a/karaf/pom.xml b/karaf/pom.xml index d0a9028..7be339b 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim daexim-karaf - 1.17.0-SNAPSHOT + 1.17.0 pom ${project.artifactId} diff --git a/model/pom.xml b/model/pom.xml index 730d739..383c192 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim daexim-model bundle - 1.17.0-SNAPSHOT + 1.17.0 diff --git a/parent/pom.xml b/parent/pom.xml index 76fbc70..c7aedd5 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -16,7 +16,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim parent - 1.17.0-SNAPSHOT + 1.17.0 pom diff --git a/pom.xml b/pom.xml index c755a60..75536a4 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html pom org.opendaylight.daexim daexim - 1.17.0-SNAPSHOT + 1.17.0 test-model model diff --git a/spi/pom.xml b/spi/pom.xml index 9071705..c9585b4 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -18,5 +18,5 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim daexim-spi bundle - 1.17.0-SNAPSHOT + 1.17.0 diff --git a/test-model/pom.xml b/test-model/pom.xml index 9a2752c..7844021 100644 --- a/test-model/pom.xml +++ b/test-model/pom.xml @@ -18,5 +18,5 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.daexim daexim-test-model bundle - 1.17.0-SNAPSHOT + 1.17.0 -- 2.34.1