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.git


The following commit(s) were added to refs/heads/main by this push:
     new f84f5901309 Upgrade to jolokia 2.1.0
f84f5901309 is described below

commit f84f5901309c8340c7363bc32163943e332d6e07
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Aug 13 06:57:04 2024 +0200

    Upgrade to jolokia 2.1.0
---
 .../http/plugin/DefaultJolokiaPlatformHttpPlugin.java         | 11 +++++++++++
 .../src/main/resources/templates/quarkus-pom.tmpl             |  2 +-
 .../main/resources/templates/spring-boot-kubernetes-pom.tmpl  |  2 +-
 .../src/main/resources/templates/spring-boot-pom.tmpl         |  2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-platform-http-jolokia/src/main/java/org/apache/camel/component/platform/http/plugin/DefaultJolokiaPlatformHttpPlugin.java
 
b/components/camel-platform-http-jolokia/src/main/java/org/apache/camel/component/platform/http/plugin/DefaultJolokiaPlatformHttpPlugin.java
index 22ae2651c4c..053529db681 100644
--- 
a/components/camel-platform-http-jolokia/src/main/java/org/apache/camel/component/platform/http/plugin/DefaultJolokiaPlatformHttpPlugin.java
+++ 
b/components/camel-platform-http-jolokia/src/main/java/org/apache/camel/component/platform/http/plugin/DefaultJolokiaPlatformHttpPlugin.java
@@ -215,6 +215,17 @@ public class DefaultJolokiaPlatformHttpPlugin extends 
ServiceSupport implements
                     }
                 }
 
+                // convert data to string
+                if (json != null) {
+                    try {
+                        Method m = 
ReflectionHelper.findMethod(json.getClass(), "toJSONString");
+                        if (m != null) {
+                            json = ObjectHelper.invokeMethodSafe(m, json);
+                        }
+                    } catch (Exception e) {
+                        // ignore
+                    }
+                }
                 String data = json != null ? json.toString() : "";
 
                 routingContext.response()
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl
 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl
index f42cf165e8f..f2dacd47634 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl
@@ -168,7 +168,7 @@
                                       <artifactItem>
                                         <groupId>org.jolokia</groupId>
                                         
<artifactId>jolokia-agent-jvm</artifactId>
-                                        <version>2.0.3</version>
+                                        <version>2.1.0</version>
                                         <type>jar</type>
                                         <classifier>javaagent</classifier>
                                       </artifactItem>
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
index e796b964b6c..0e78042da69 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
@@ -171,7 +171,7 @@
                                       <artifactItem>
                                         <groupId>org.jolokia</groupId>
                                         
<artifactId>jolokia-agent-jvm</artifactId>
-                                        <version>2.0.3</version>
+                                        <version>2.1.0</version>
                                         <type>jar</type>
                                         <classifier>javaagent</classifier>
                                       </artifactItem>
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-pom.tmpl
 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-pom.tmpl
index 5ede6c0a959..aeed0211066 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-pom.tmpl
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-pom.tmpl
@@ -110,7 +110,7 @@
                                       <artifactItem>
                                         <groupId>org.jolokia</groupId>
                                         
<artifactId>jolokia-agent-jvm</artifactId>
-                                        <version>2.0.3</version>
+                                        <version>2.1.0</version>
                                         <type>jar</type>
                                         <classifier>javaagent</classifier>
                                       </artifactItem>

Reply via email to