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 632cde6f5d7 Remove unused JmsSendDynamicPostProcessor (#11191)
632cde6f5d7 is described below
commit 632cde6f5d7cf8ab4bc916853eff290e92a41ed5
Author: Denis Istomin <[email protected]>
AuthorDate: Thu Aug 24 00:08:05 2023 +0500
Remove unused JmsSendDynamicPostProcessor (#11191)
---
.../component/jms/JmsSendDynamicPostProcessor.java | 28 ----------------------
.../jms/JmsToFullyQualifiedQueueNameTest.java | 9 ++++---
2 files changed, 6 insertions(+), 31 deletions(-)
diff --git
a/components/camel-jms/src/main/resources/org/apache/camel/component/jms/JmsSendDynamicPostProcessor.java
b/components/camel-jms/src/main/resources/org/apache/camel/component/jms/JmsSendDynamicPostProcessor.java
deleted file mode 100644
index 2b155768400..00000000000
---
a/components/camel-jms/src/main/resources/org/apache/camel/component/jms/JmsSendDynamicPostProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.jms;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-
-public class JmsSendDynamicPostProcessor implements Processor {
-
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getMessage().removeHeader(JmsConstants.JMS_DESTINATION_NAME);
- }
-}
diff --git
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsToFullyQualifiedQueueNameTest.java
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsToFullyQualifiedQueueNameTest.java
index d8ab6d15a0d..854bec0917a 100644
---
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsToFullyQualifiedQueueNameTest.java
+++
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsToFullyQualifiedQueueNameTest.java
@@ -28,6 +28,8 @@ import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
/**
* Queue can be specified using `Fully Qualified Queue Name`.
*/
@@ -56,9 +58,10 @@ public class JmsToFullyQualifiedQueueNameTest extends
AbstractJMSTest {
}
private void expect(String uri, String body) {
- MockEndpoint mockDynamicFoo = getMockEndpoint(uri);
- mockDynamicFoo.expectedMessageCount(1);
- mockDynamicFoo.expectedBodiesReceived(body);
+ MockEndpoint mockEndpoint = getMockEndpoint(uri);
+ mockEndpoint.expectedMessageCount(1);
+ mockEndpoint.expectedBodiesReceived(body);
+ mockEndpoint.whenAnyExchangeReceived(x ->
assertNull(x.getMessage().getHeader(JmsConstants.JMS_DESTINATION_NAME)));
}
@Override