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 2022/06/12 17:22:22 UTC

[camel] branch main updated: Small fixes to error messages. (#7766)

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 b4d6bb7b5bf Small fixes to error messages. (#7766)
b4d6bb7b5bf is described below

commit b4d6bb7b5bf1c3017928c731272c2392bf88745c
Author: Adriano Machado <60...@users.noreply.github.com>
AuthorDate: Sun Jun 12 13:22:17 2022 -0400

    Small fixes to error messages. (#7766)
    
    Co-authored-by: Adriano Machado <>
---
 core/camel-api/src/main/java/org/apache/camel/Message.java        | 2 +-
 .../apache/camel/impl/engine/DefaultFluentProducerTemplate.java   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/Message.java b/core/camel-api/src/main/java/org/apache/camel/Message.java
index fecc3a39bfb..b09c86cb2d0 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Message.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Message.java
@@ -183,7 +183,7 @@ public interface Message {
     boolean removeHeaders(String pattern, String... excludePatterns);
 
     /**
-     * Returns all of the headers associated with the message.
+     * Returns all the headers associated with the message.
      * <p/>
      * Headers is represented in Camel using a {@link org.apache.camel.util.CaseInsensitiveMap CaseInsensitiveMap}. The
      * implementation of the map can be configured by the {@link HeadersMapFactory} which can be set on the
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java
index d6888715cad..42b12afee04 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java
@@ -72,7 +72,7 @@ public class DefaultFluentProducerTemplate extends ServiceSupport implements Flu
     public DefaultFluentProducerTemplate(CamelContext context) {
         this.context = context;
         this.eventNotifierEnabled = true;
-        this.resultProcessors = new ClassValue<Processor>() {
+        this.resultProcessors = new ClassValue<>() {
             @Override
             protected Processor computeValue(Class<?> type) {
                 return new ConvertBodyProcessor(type);
@@ -185,7 +185,7 @@ public class DefaultFluentProducerTemplate extends ServiceSupport implements Flu
         DefaultFluentProducerTemplate clone = checkCloned();
 
         if (clone.processorSupplier != null) {
-            throw new IllegalArgumentException("Cannot use both withBody and withProcessor with FluentProducerTemplate");
+            throw new IllegalArgumentException("Cannot use both withHeaders and withProcessor with FluentProducerTemplate");
         }
 
         Map<String, Object> map = clone.headers;
@@ -202,7 +202,7 @@ public class DefaultFluentProducerTemplate extends ServiceSupport implements Flu
         DefaultFluentProducerTemplate clone = checkCloned();
 
         if (clone.processorSupplier != null) {
-            throw new IllegalArgumentException("Cannot use both withBody and withProcessor with FluentProducerTemplate");
+            throw new IllegalArgumentException("Cannot use both withHeader and withProcessor with FluentProducerTemplate");
         }
 
         Map<String, Object> map = clone.headers;
@@ -240,7 +240,7 @@ public class DefaultFluentProducerTemplate extends ServiceSupport implements Flu
         DefaultFluentProducerTemplate clone = checkCloned();
 
         if (clone.processorSupplier != null) {
-            throw new IllegalArgumentException("Cannot use both withBody and withProcessor with FluentProducerTemplate");
+            throw new IllegalArgumentException("Cannot use both withBodyAs and withProcessor with FluentProducerTemplate");
         }
 
         Object b = type != null