From 204bbfb2dd706976ab9edad98be5f960a138a1f8 Mon Sep 17 00:00:00 2001 From: Alexander Suter Date: Fri, 5 Jul 2024 13:53:36 +0200 Subject: [PATCH] Streamline slf4j version --- pom.xml | 2 +- .../ivy/maven/engine/EngineClassLoaderFactory.java | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 5c0b85be..68e394a7 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 17 3.6.3 - 2.0.12 + 2.0.13 snapshot release Stable diff --git a/src/main/java/ch/ivyteam/ivy/maven/engine/EngineClassLoaderFactory.java b/src/main/java/ch/ivyteam/ivy/maven/engine/EngineClassLoaderFactory.java index 302515dd..9bf8b2a2 100644 --- a/src/main/java/ch/ivyteam/ivy/maven/engine/EngineClassLoaderFactory.java +++ b/src/main/java/ch/ivyteam/ivy/maven/engine/EngineClassLoaderFactory.java @@ -42,7 +42,7 @@ * Factory that provides an {@link URLClassLoader} for ivy Engine class access. * This makes invocation of engine parts possible without starting a new java * process. - * + * * @author Reguel Wermelinger * @since 25.09.2014 */ @@ -54,7 +54,7 @@ public interface OsgiDir { } /** must match version in pom.xml */ - private static final String SLF4J_VERSION = "2.0.12"; + private static final String SLF4J_VERSION = "2.0.13"; private static final List ENGINE_LIB_DIRECTORIES = Arrays.asList( OsgiDir.INSTALL_AREA + "/" + OsgiDir.LIB_BOOT, @@ -102,9 +102,7 @@ public static List getOsgiBootstrapClasspath(File engineDirectory) { private static void addToClassPath(List classPathFiles, File dir, IOFileFilter fileFilter) { if (dir.isDirectory()) { - for (File jar : FileUtils.listFiles(dir, fileFilter, null)) { - classPathFiles.add(jar); - } + classPathFiles.addAll(FileUtils.listFiles(dir, fileFilter, null)); } } @@ -115,9 +113,7 @@ public static List getIvyEngineClassPathFiles(File engineDirectory) { if (!jarDir.isDirectory()) { continue; } - for (File jar : FileUtils.listFiles(jarDir, new String[] {"jar"}, true)) { - classPathFiles.add(jar); - } + classPathFiles.addAll(FileUtils.listFiles(jarDir, new String[] {"jar"}, true)); } return classPathFiles; }