cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1567769 - in /cxf/trunk/rt/transports/jms/src: main/java/org/apache/cxf/transport/jms/uri/ test/java/org/apache/cxf/transport/jms/uri/
Date Wed, 12 Feb 2014 22:05:24 GMT
Author: cschneider
Date: Wed Feb 12 22:05:24 2014
New Revision: 1567769

URL: http://svn.apache.org/r1567769
Log:
CXF-5543 Remove specific JMSEndpoint subclasses as they are not used

Removed:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSJNDIEndpoint.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSQueueEndpoint.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSTopicEndpoint.java
Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpointParser.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpointParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpointParser.java?rev=1567769&r1=1567768&r2=1567769&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpointParser.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpointParser.java
Wed Feb 12 22:05:24 2014
@@ -213,11 +213,11 @@ public final class JMSEndpointParser {
         // JMSConfiguration newConfiguration = getConfiguration().copy();
         JMSEndpoint endpoint = null;
         if (isQueue) {
-            endpoint = new JMSQueueEndpoint(uri, subject);
+            endpoint = new JMSEndpoint(uri, JMSURIConstants.QUEUE, subject);
         } else if (isTopic) {
-            endpoint = new JMSTopicEndpoint(uri, subject);
+            endpoint = new JMSEndpoint(uri, JMSURIConstants.TOPIC, subject);
         } else if (isJndi) {
-            endpoint = new JMSJNDIEndpoint(uri, subject);
+            endpoint = new JMSEndpoint(uri, JMSURIConstants.JNDI, subject);
         }
         return endpoint;
     }

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java?rev=1567769&r1=1567768&r2=1567769&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
Wed Feb 12 22:05:24 2014
@@ -29,7 +29,7 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testBasicQueue() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals(endpoint.getDestinationName(), "Foo.Bar");
         assertEquals(endpoint.getJmsVariant(), JMSURIConstants.QUEUE);
     }
@@ -37,7 +37,7 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testQueueParameters() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?foo=bar&foo2=bar2");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals(endpoint.getDestinationName(), "Foo.Bar");
         assertEquals(endpoint.getJmsVariant(), JMSURIConstants.QUEUE);
         assertEquals(endpoint.getParameters().size(), 2);
@@ -48,7 +48,7 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testBasicTopic() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:topic:Foo.Bar");
-        assertTrue(endpoint instanceof JMSTopicEndpoint);
+        assertEquals(JMSURIConstants.TOPIC, endpoint.getJmsVariant());
         assertEquals(endpoint.getDestinationName(), "Foo.Bar");
         assertEquals(endpoint.getJmsVariant(), JMSURIConstants.TOPIC);
     }
@@ -56,7 +56,7 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testTopicParameters() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:topic:Foo.Bar?foo=bar&foo2=bar2");
-        assertTrue(endpoint instanceof JMSTopicEndpoint);
+        assertEquals(JMSURIConstants.TOPIC, endpoint.getJmsVariant());
         assertEquals(endpoint.getParameters().size(), 2);
         assertEquals(endpoint.getParameter("foo"), "bar");
         assertEquals(endpoint.getParameter("foo2"), "bar2");
@@ -65,7 +65,7 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testBasicJNDI() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:jndi:Foo.Bar");
-        assertTrue(endpoint instanceof JMSJNDIEndpoint);
+        assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
         assertEquals(endpoint.getDestinationName(), "Foo.Bar");
         assertEquals(endpoint.getJmsVariant(), JMSURIConstants.JNDI);
     }
@@ -76,7 +76,7 @@ public class JMSEndpointTest extends Ass
                                                + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
                                                + "&jndiConnectionFactoryName=ConnectionFactory"
                                                + "&jndiURL=tcp://localhost:61616");
-        assertTrue(endpoint instanceof JMSJNDIEndpoint);
+        assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
         assertEquals(endpoint.getParameters().size(), 0);
         assertEquals(endpoint.getDestinationName(), "Foo.Bar");
         assertEquals(endpoint.getJndiInitialContextFactory(),
@@ -89,7 +89,7 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testReplyToNameParameters() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?replyToName=FOO.Tar");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals("Foo.Bar", endpoint.getDestinationName());
         assertNull(endpoint.getTopicReplyToName());
         assertEquals("FOO.Tar", endpoint.getReplyToName());
@@ -113,7 +113,7 @@ public class JMSEndpointTest extends Ass
                                                + "&jndiConnectionFactoryName=ConnectionFactory"
                                                + "&jndiURL=tcp://localhost:61616"
                                                + "&jndi-com.sun.jndi.someParameter=someValue");
-        assertTrue(endpoint instanceof JMSJNDIEndpoint);
+        assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
         assertEquals(endpoint.getParameters().size(), 0);
         assertEquals(endpoint.getJndiInitialContextFactory(),
                      "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
@@ -128,7 +128,7 @@ public class JMSEndpointTest extends Ass
     public void testSharedParameters() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?" + "deliveryMode=NON_PERSISTENT"
                                                + "&timeToLive=100" + "&priority=5"
+ "&replyToName=foo.bar2");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals(endpoint.getParameters().size(), 0);
         assertEquals(endpoint.getDeliveryMode().toString(),
                      JMSURIConstants.DELIVERYMODE_NON_PERSISTENT.toString());
@@ -147,7 +147,7 @@ public class JMSEndpointTest extends Ass
                                                + "&priority=3"
                                                + "&foo=bar"
                                                + "&foo2=bar2");
-        assertTrue(endpoint instanceof JMSJNDIEndpoint);
+        assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
         assertEquals(endpoint.getParameters().size(), 3);
         String requestUri = endpoint.getRequestURI();
         // Checking what's the request uri should have
@@ -164,15 +164,15 @@ public class JMSEndpointTest extends Ass
     @Test
     public void testRequestUriWithMessageType() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?messageType=text");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals("text", endpoint.getMessageType().value());
         
         endpoint = resolveEndpoint("jms:queue:Foo.Bar");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals("byte", endpoint.getMessageType().value());
         
         endpoint = resolveEndpoint("jms:queue:Foo.Bar?messageType=binary");
-        assertTrue(endpoint instanceof JMSQueueEndpoint);
+        assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
         assertEquals("binary", endpoint.getMessageType().value());
         
     }



Mime
View raw message