You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/12/21 10:17:06 UTC

(camel-spring-boot) branch main updated (d15e91f7b36 -> 540e45bbdad)

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

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


    from d15e91f7b36 Regen
     new c2947190846 CAMEL-20262: camel-spring-boot - Fix fatjar scan classresolver to work with SB nested JARs in fat-jar
     new 540e45bbdad Regen

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../boot/FatJarPackageScanClassResolver.java       | 32 ++++++++++++++++++++++
 .../boot/FatJarPackageScanResourceResolver.java    | 10 +++----
 tooling/camel-spring-boot-dependencies/pom.xml     |  4 +--
 3 files changed, 38 insertions(+), 8 deletions(-)


(camel-spring-boot) 02/02: Regen

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 540e45bbdad99ad9c0906562e1b733bf0f6bd539
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 21 11:16:56 2023 +0100

    Regen
---
 tooling/camel-spring-boot-dependencies/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tooling/camel-spring-boot-dependencies/pom.xml b/tooling/camel-spring-boot-dependencies/pom.xml
index 18f00cf0fa7..f54e7653a3c 100644
--- a/tooling/camel-spring-boot-dependencies/pom.xml
+++ b/tooling/camel-spring-boot-dependencies/pom.xml
@@ -235,12 +235,12 @@
       <dependency>
         <groupId>net.bytebuddy</groupId>
         <artifactId>byte-buddy</artifactId>
-        <version>1.14.10</version>
+        <version>1.14.11</version>
       </dependency>
       <dependency>
         <groupId>net.bytebuddy</groupId>
         <artifactId>byte-buddy-agent</artifactId>
-        <version>1.14.10</version>
+        <version>1.14.11</version>
       </dependency>
       <dependency>
         <groupId>org.apache.avro</groupId>


(camel-spring-boot) 01/02: CAMEL-20262: camel-spring-boot - Fix fatjar scan classresolver to work with SB nested JARs in fat-jar

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit c29471908469aef48df3296100e0ad2c5fbd8d3d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 21 11:15:36 2023 +0100

    CAMEL-20262: camel-spring-boot - Fix fatjar scan classresolver to work with SB nested JARs in fat-jar
---
 .../boot/FatJarPackageScanClassResolver.java       | 32 ++++++++++++++++++++++
 .../boot/FatJarPackageScanResourceResolver.java    | 10 +++----
 2 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanClassResolver.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanClassResolver.java
index 0fcede943e3..63aeca3ee98 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanClassResolver.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanClassResolver.java
@@ -18,6 +18,11 @@ package org.apache.camel.spring.boot;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.jar.JarEntry;
@@ -25,6 +30,7 @@ import java.util.jar.JarInputStream;
 
 import org.apache.camel.impl.engine.DefaultPackageScanClassResolver;
 import org.apache.camel.util.IOHelper;
+import org.apache.camel.util.StringHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,6 +52,32 @@ public class FatJarPackageScanClassResolver extends DefaultPackageScanClassResol
         return doLoadJarClassEntries(stream, urlPath, true, true);
     }
 
+    @Override
+    protected String parseUrlPath(URL url) {
+        String urlPath = url.getFile();
+
+        urlPath = URLDecoder.decode(urlPath, StandardCharsets.UTF_8);
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("Decoded urlPath: {} with protocol: {}", urlPath, url.getProtocol());
+        }
+
+        String nested = "nested:";
+        if (urlPath.startsWith(nested)) {
+            try {
+                urlPath = (new URI(url.getFile())).getPath();
+                return StringHelper.before(urlPath, "!", urlPath);
+            } catch (URISyntaxException e) {
+                // ignore
+            }
+            if (urlPath.startsWith(nested)) {
+                urlPath = urlPath.substring(nested.length());
+                return StringHelper.before(urlPath, "!", urlPath);
+            }
+        }
+
+        return super.parseUrlPath(url);
+    }
+
     protected List<String> doLoadJarClassEntries(InputStream stream, String urlPath, boolean inspectNestedJars, boolean closeStream) {
         List<String> entries = new ArrayList<>();
 
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanResourceResolver.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanResourceResolver.java
index e0675813306..f661c5d3902 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanResourceResolver.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/FatJarPackageScanResourceResolver.java
@@ -88,26 +88,25 @@ public class FatJarPackageScanResourceResolver extends DefaultPackageScanResourc
         return entries;
     }
 
+    @Override
     protected String parseUrlPath(URL url) {
         String urlPath = url.getFile();
+
         urlPath = URLDecoder.decode(urlPath, StandardCharsets.UTF_8);
         if (LOG.isTraceEnabled()) {
             LOG.trace("Decoded urlPath: {} with protocol: {}", urlPath, url.getProtocol());
         }
 
         String nested = "nested:";
-
         if (urlPath.startsWith(nested)) {
             try {
                 urlPath = (new URI(url.getFile())).getPath();
-
                 return StringHelper.before(urlPath, "!", urlPath);
-            } catch (URISyntaxException var4) {
+            } catch (URISyntaxException e) {
+                // ignore
             }
-
             if (urlPath.startsWith(nested)) {
                 urlPath = urlPath.substring(nested.length());
-
                 return StringHelper.before(urlPath, "!", urlPath);
             }
         }
@@ -131,5 +130,4 @@ public class FatJarPackageScanResourceResolver extends DefaultPackageScanResourc
         return name;
     }
 
-
 }