Repository: qpid-jms Updated Branches: refs/heads/master 9437e5129 -> 79b6cce18
remove test-only method Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/9d30cdec Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/9d30cdec Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/9d30cdec Branch: refs/heads/master Commit: 9d30cdec623e00477c3c90bc18625b527617f536 Parents: 9437e51 Author: Robert Gemmell <[email protected]> Authored: Tue Feb 3 10:10:37 2015 +0000 Committer: Robert Gemmell <[email protected]> Committed: Tue Feb 3 10:10:37 2015 +0000 ---------------------------------------------------------------------- .../org/apache/qpid/jms/JmsMessageProducer.java | 17 -------------- .../jms/producer/JmsMessageProducerTest.java | 24 -------------------- 2 files changed, 41 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9d30cdec/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsMessageProducer.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsMessageProducer.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsMessageProducer.java index 6f95deb..7d296c2 100644 --- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsMessageProducer.java +++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsMessageProducer.java @@ -27,7 +27,6 @@ import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageProducer; -import org.apache.qpid.jms.message.JmsMessageTransformation; import org.apache.qpid.jms.meta.JmsProducerId; import org.apache.qpid.jms.meta.JmsProducerInfo; import org.apache.qpid.jms.provider.Provider; @@ -289,22 +288,6 @@ public class JmsMessageProducer implements MessageProducer { } /** - * @param destination - * the destination to set - * @throws JMSException - * @throws InvalidDestinationException - */ - public void setDestination(Destination destination) throws JMSException { - if (destination == null) { - throw new InvalidDestinationException("Don't understand null destinations"); - } - if (!this.flexibleDestination && !destination.equals(producerInfo.getDestination())) { - throw new UnsupportedOperationException("This producer can only send messages to: " + producerInfo.getDestination().getName()); - } - producerInfo.setDestination(JmsMessageTransformation.transformDestination(session.getConnection(), destination)); - } - - /** * @return the producer's assigned JmsProducerId. */ protected JmsProducerId getProducerId() { http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9d30cdec/qpid-jms-client/src/test/java/org/apache/qpid/jms/producer/JmsMessageProducerTest.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/producer/JmsMessageProducerTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/producer/JmsMessageProducerTest.java index 46e6c4c..921b8e2 100644 --- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/producer/JmsMessageProducerTest.java +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/producer/JmsMessageProducerTest.java @@ -63,30 +63,6 @@ public class JmsMessageProducerTest extends JmsConnectionTestSupport { producer.close(); } - @Test(timeout = 10000, expected = InvalidDestinationException.class) - public void testSetDestinationToNull() throws Exception { - JmsMessageProducer producer = (JmsMessageProducer) session.createProducer(null); - producer.setDestination(null); - } - - @Test(timeout = 10000) - public void testSetDestinationToCurrentValue() throws Exception { - JmsMessageProducer producer = (JmsMessageProducer) session.createProducer(queue); - producer.setDestination(queue); - } - - @Test(timeout = 10000, expected = UnsupportedOperationException.class) - public void testSetDesinationOnNonAnonymousProducer() throws Exception { - JmsMessageProducer producer = (JmsMessageProducer) session.createProducer(queue); - producer.setDestination(topic); - } - - @Test(timeout = 10000) - public void testSetDesinationOnAnonymousProducer() throws Exception { - JmsMessageProducer producer = (JmsMessageProducer) session.createProducer(null); - producer.setDestination(topic); - } - @Test(timeout = 10000) public void testCreateProducerWithNullDestination() throws Exception { MessageProducer producer = session.createProducer(null); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
