You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/04/11 14:41:36 UTC

[camel] branch main updated: Replaced the concatenation as an argument of StringBuilder.append() call with the chain of StringBuilder.append() calls. Converted single char strings to chars. PR for core (#9845)

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

nfilotto 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 c483ea3d62f Replaced the concatenation as an argument of StringBuilder.append() call with the chain of StringBuilder.append() calls. Converted single char strings to chars. PR for core (#9845)
c483ea3d62f is described below

commit c483ea3d62f817bdbf9f444fc942712c5fb08c3b
Author: dk2k <dk...@users.noreply.github.com>
AuthorDate: Tue Apr 11 17:41:23 2023 +0300

    Replaced the concatenation as an argument of StringBuilder.append() call with the chain of StringBuilder.append() calls. Converted single char strings to chars. PR for core (#9845)
    
    Co-authored-by: dk2k <dk...@ya.ru>
---
 .../src/main/java/org/apache/camel/CamelExchangeException.java        | 3 ++-
 core/camel-xml-io/src/main/java/org/apache/camel/xml/io/MXParser.java | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelExchangeException.java b/core/camel-api/src/main/java/org/apache/camel/CamelExchangeException.java
index 770106dbbde..5cc51e1b7f7 100644
--- a/core/camel-api/src/main/java/org/apache/camel/CamelExchangeException.java
+++ b/core/camel-api/src/main/java/org/apache/camel/CamelExchangeException.java
@@ -66,7 +66,8 @@ public class CamelExchangeException extends CamelException {
             if (sb.length() > 0) {
                 sb.append(". ");
             }
-            sb.append("Caused by: [" + cause.getClass().getName() + " - " + cause.getMessage() + "]");
+            sb.append("Caused by: [").append(cause.getClass().getName()).append(" - ")
+                    .append(cause.getMessage()).append(']');
         }
         return sb.toString().trim();
     }
diff --git a/core/camel-xml-io/src/main/java/org/apache/camel/xml/io/MXParser.java b/core/camel-xml-io/src/main/java/org/apache/camel/xml/io/MXParser.java
index cd3a1e04b39..3ab0094186d 100644
--- a/core/camel-xml-io/src/main/java/org/apache/camel/xml/io/MXParser.java
+++ b/core/camel-xml-io/src/main/java/org/apache/camel/xml/io/MXParser.java
@@ -2873,8 +2873,8 @@ public class MXParser implements XmlPullParser {
                                                                  // one end tag
                             }
                             String tagName = new String(elRawName[i], 0, elRawNameEnd[i]);
-                            expectedTagStack.append(" start tag <" + tagName + ">");
-                            expectedTagStack.append(" from line " + elRawNameLine[i]);
+                            expectedTagStack.append(" start tag <").append(tagName).append('>');
+                            expectedTagStack.append(" from line ").append(elRawNameLine[i]);
                         }
                         expectedTagStack.append(", parser stopped on");
                     }