This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.4.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.4.x by this push:
     new 67c9f87725 KARAF-7974: Upgrade to Pax URL 3.0.1 (#1960)
67c9f87725 is described below

commit 67c9f87725ba3b17780b246f96639d5e1f95d0c3
Author: JB Onofré <[email protected]>
AuthorDate: Thu Jul 24 15:21:39 2025 +0200

    KARAF-7974: Upgrade to Pax URL 3.0.1 (#1960)
    
    (cherry picked from commit ca1ebbc293812a45333e6ac615d3a653779f9006)
---
 .../features/command/RepoListCommandTest.java      | 30 +++++++++++++++++++---
 .../command/MavenConfigurationSupportTest.java     |  2 +-
 pom.xml                                            |  2 +-
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git 
a/features/command/src/test/java/org/apache/karaf/features/command/RepoListCommandTest.java
 
b/features/command/src/test/java/org/apache/karaf/features/command/RepoListCommandTest.java
index 8957c3a9e6..1c69dc0715 100644
--- 
a/features/command/src/test/java/org/apache/karaf/features/command/RepoListCommandTest.java
+++ 
b/features/command/src/test/java/org/apache/karaf/features/command/RepoListCommandTest.java
@@ -22,7 +22,6 @@ import org.easymock.Capture;
 import org.easymock.CaptureType;
 import org.easymock.EasyMock;
 import org.junit.Test;
-import shaded.org.apache.commons.lang3.StringUtils;
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
@@ -130,14 +129,39 @@ public class RepoListCommandTest extends 
RepositoryCommandTestBase {
         String[] commandOutput = baos.toString().split("\\R");
         assertEquals(2, commandOutput.length);
         String blacklistedRepoLineNoSpaces = blacklistedRepoName + 
blacklistedRepo.getURI() + "yes";
-        assertEquals(StringUtils.deleteWhitespace(commandOutput[0].trim()), 
blacklistedRepoLineNoSpaces);
+        
assertEquals(RepoListCommandTest.deleteWhitespace(commandOutput[0].trim()), 
blacklistedRepoLineNoSpaces);
 
         String whitelistedRepoLineNoSpaces = whitelistedRepoName + 
whitelistedRepo.getURI() + "no";
-        assertEquals(StringUtils.deleteWhitespace(commandOutput[1]), 
whitelistedRepoLineNoSpaces);
+        assertEquals(RepoListCommandTest.deleteWhitespace(commandOutput[1]), 
whitelistedRepoLineNoSpaces);
 
         EasyMock.verify(service, blacklistedRepo, whitelistedRepo);
     }
 
+    private static boolean isEmpty(final CharSequence cs) {
+        return cs == null || cs.length() == 0;
+    }
+
+    private static String deleteWhitespace(final String str) {
+        if (isEmpty(str)) {
+            return str;
+        }
+        final int sz = str.length();
+        final char[] chs = new char[sz];
+        int count = 0;
+        for (int i = 0; i < sz; i++) {
+            if (!Character.isWhitespace(str.charAt(i))) {
+                chs[count++] = str.charAt(i);
+            }
+        }
+        if (count == sz) {
+            return str;
+        }
+        if (count == 0) {
+            return "";
+        }
+        return new String(chs, 0, count);
+    }
+
     @Test
     public void testPasswordsHidden() throws Exception {
         FeaturesService service = EasyMock.createMock(FeaturesService.class);
diff --git 
a/maven/core/src/test/java/org/apache/karaf/maven/command/MavenConfigurationSupportTest.java
 
b/maven/core/src/test/java/org/apache/karaf/maven/command/MavenConfigurationSupportTest.java
index a76319fa4a..2399b64453 100644
--- 
a/maven/core/src/test/java/org/apache/karaf/maven/command/MavenConfigurationSupportTest.java
+++ 
b/maven/core/src/test/java/org/apache/karaf/maven/command/MavenConfigurationSupportTest.java
@@ -22,8 +22,8 @@ import java.io.IOException;
 import java.util.Dictionary;
 import java.util.regex.Pattern;
 
+import org.apache.commons.io.FileUtils;
 import org.junit.Test;
-import shaded.org.apache.commons.io.FileUtils;
 
 import static org.junit.Assert.assertTrue;
 
diff --git a/pom.xml b/pom.xml
index 2f1443b0f2..db9d40874d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -326,7 +326,7 @@
         <pax.logging.version>2.2.8</pax.logging.version>
         <pax.base.version>1.5.1</pax.base.version>
         <pax.swissbox.version>1.9.0</pax.swissbox.version>
-        <pax.url.version>2.6.16</pax.url.version>
+        <pax.url.version>3.0.1</pax.url.version>
         <pax.web.version>8.0.32</pax.web.version>
         <jetty.version>9.4.57.v20241219</jetty.version>
         <pax.tinybundle.version>4.0.1</pax.tinybundle.version>

Reply via email to