You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/06/22 13:07:17 UTC

[camel] branch main updated (184a5e47dd2 -> 01d6e10ad40)

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

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 184a5e47dd2 CAMEL-18149: camel-spring-boot - Add camel developer console as actuator that can be enabled.
     new c880b0ca507 (chores) camel-jms: removed unused parameters
     new 01d6e10ad40 (chores) camel-sjms: removed unused parameters

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:
 .../org/apache/camel/component/jms/JmsBinding.java   | 20 ++++++++++----------
 .../org/apache/camel/component/jms/JmsComponent.java |  5 +++++
 .../apache/camel/component/sjms/jms/JmsBinding.java  |  4 ++--
 3 files changed, 17 insertions(+), 12 deletions(-)


[camel] 01/02: (chores) camel-jms: removed unused parameters

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c880b0ca5072b98ce8f884449fd2d22b396511c5
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jun 22 12:59:18 2022 +0200

    (chores) camel-jms: removed unused parameters
    
    Also document parameters that seem unused but are not
---
 .../org/apache/camel/component/jms/JmsBinding.java   | 20 ++++++++++----------
 .../org/apache/camel/component/jms/JmsComponent.java |  5 +++++
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
index 1203270ff09..76f2fd8e65a 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
@@ -164,7 +164,7 @@ public class JmsBinding {
             } else if (message instanceof StreamMessage) {
                 LOG.trace("Extracting body as a StreamMessage from JMS message: {}", message);
                 StreamMessage streamMessage = (StreamMessage) message;
-                return createInputStreamFromStreamMessage(exchange, streamMessage);
+                return createInputStreamFromStreamMessage(streamMessage);
             } else {
                 return null;
             }
@@ -275,7 +275,7 @@ public class JmsBinding {
         return result;
     }
 
-    protected Object createInputStreamFromStreamMessage(Exchange exchange, StreamMessage message) {
+    protected Object createInputStreamFromStreamMessage(StreamMessage message) {
         return new StreamMessageInputStream(message);
     }
 
@@ -371,12 +371,12 @@ public class JmsBinding {
         for (Map.Entry<String, Object> entry : entries) {
             String headerName = entry.getKey();
             Object headerValue = entry.getValue();
-            appendJmsProperty(jmsMessage, exchange, in, headerName, headerValue);
+            appendJmsProperty(jmsMessage, exchange, headerName, headerValue);
         }
     }
 
     public void appendJmsProperty(
-            Message jmsMessage, Exchange exchange, org.apache.camel.Message in,
+            Message jmsMessage, Exchange exchange,
             String headerName, Object headerValue)
             throws JMSException {
         if (isStandardJMSHeader(headerName)) {
@@ -407,7 +407,7 @@ public class JmsBinding {
                 // log at trace level to not spam log
                 LOG.trace("Ignoring JMS header: {} with value: {}", headerName, headerValue);
             }
-        } else if (shouldOutputHeader(in, headerName, headerValue, exchange)) {
+        } else if (shouldOutputHeader(headerName, headerValue, exchange)) {
             // only primitive headers and strings is allowed as properties
             // see message properties: http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html
             Object value = getValidJMSHeaderValue(headerName, headerValue);
@@ -556,7 +556,7 @@ public class JmsBinding {
             // force a specific type from the endpoint configuration
             type = endpoint.getConfiguration().getJmsMessageType();
         } else {
-            type = getJMSMessageTypeForBody(exchange, body, headers, session, context);
+            type = getJMSMessageTypeForBody(exchange, body);
         }
 
         // create the JmsMessage based on the type
@@ -565,7 +565,7 @@ public class JmsBinding {
                 throw new JMSException("Cannot send message as message body is null, and option allowNullBody is false.");
             }
             LOG.trace("Using JmsMessageType: {}", type);
-            Message answer = createJmsMessageForType(exchange, body, headers, session, context, type);
+            Message answer = createJmsMessageForType(exchange, body, session, context, type);
             // ensure default delivery mode is used by default
             answer.setJMSDeliveryMode(Message.DEFAULT_DELIVERY_MODE);
             return answer;
@@ -599,7 +599,7 @@ public class JmsBinding {
      * @return type or null if no mapping was possible
      */
     protected JmsMessageType getJMSMessageTypeForBody(
-            Exchange exchange, Object body, Map<String, Object> headers, Session session, CamelContext context) {
+            Exchange exchange, Object body) {
         boolean streamingEnabled = endpoint.getConfiguration().isStreamMessageTypeEnabled();
 
         JmsMessageType type = null;
@@ -639,7 +639,7 @@ public class JmsBinding {
      * @return jmsMessage or null if the mapping was not successfully
      */
     protected Message createJmsMessageForType(
-            Exchange exchange, Object body, Map<String, Object> headers, Session session, CamelContext context,
+            Exchange exchange, Object body, Session session, CamelContext context,
             JmsMessageType type)
             throws JMSException {
         switch (type) {
@@ -770,7 +770,7 @@ public class JmsBinding {
      * <b>Note</b>: Currently only supports sending java identifiers as keys
      */
     protected boolean shouldOutputHeader(
-            org.apache.camel.Message camelMessage, String headerName,
+            String headerName,
             Object headerValue, Exchange exchange) {
         return headerFilterStrategy == null
                 || !headerFilterStrategy.applyFilterToCamelHeaders(headerName, headerValue, exchange);
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
index cc6ada4dd17..4ab334663e4 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
@@ -1242,7 +1242,12 @@ public class JmsComponent extends HeaderFilterStrategyComponent {
     /**
      * A strategy method allowing the URI destination to be translated into the actual JMS destination name (say by
      * looking up in JNDI or something)
+     *
+     * @param  path       the path to convert
+     * @param  parameters an optional, component specific, set of parameters
+     * @return            the path as the actual destination
      */
+
     protected String convertPathToActualDestination(String path, Map<String, Object> parameters) {
         return path;
     }


[camel] 02/02: (chores) camel-sjms: removed unused parameters

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 01d6e10ad40cc124a6ea811e678314b1b51746ed
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jun 22 13:05:27 2022 +0200

    (chores) camel-sjms: removed unused parameters
---
 .../src/main/java/org/apache/camel/component/sjms/jms/JmsBinding.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsBinding.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsBinding.java
index e68d256f89e..94c86b55060 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsBinding.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsBinding.java
@@ -381,7 +381,7 @@ public class JmsBinding {
                 throw new JMSException("Cannot send message as message body is null, and option allowNullBody is false.");
             }
             LOG.trace("Using JmsMessageType: {}", type);
-            Message answer = createJmsMessageForType(exchange, body, headers, session, context, type);
+            Message answer = createJmsMessageForType(exchange, body, session, context, type);
             // ensure default delivery mode is used by default
             answer.setJMSDeliveryMode(Message.DEFAULT_DELIVERY_MODE);
             return answer;
@@ -441,7 +441,7 @@ public class JmsBinding {
      * @return jmsMessage or null if the mapping was not successfully
      */
     protected Message createJmsMessageForType(
-            Exchange exchange, Object body, Map<String, Object> headers, Session session, CamelContext context,
+            Exchange exchange, Object body, Session session, CamelContext context,
             JmsMessageType type)
             throws JMSException {
         switch (type) {