activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [14/53] [abbrv] [partial] activemq-artemis git commit: automatic checkstyle change
Date Mon, 10 Aug 2015 15:13:13 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
index d3f047e..8169553 100644
--- a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
+++ b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
@@ -45,61 +45,55 @@ import org.apache.commons.beanutils.BeanUtilsBean;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class ConnectionFactoryURITest
-{
+public class ConnectionFactoryURITest {
+
    ConnectionFactoryParser parser = new ConnectionFactoryParser();
 
    @Test
-   public void testQUEUE_XA_CF() throws Exception
-   {
+   public void testQUEUE_XA_CF() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=QUEUE_XA_CF"),
null);
 
       Assert.assertTrue(ActiveMQXAQueueConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testTOPICXA_CF() throws Exception
-   {
+   public void testTOPICXA_CF() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=TOPIC_XA_CF"),
null);
 
       Assert.assertTrue(ActiveMQXATopicConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
+
    @Test
 
-   public void testQUEUE_CF() throws Exception
-   {
+   public void testQUEUE_CF() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=QUEUE_CF"),
null);
 
       Assert.assertTrue(ActiveMQQueueConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testTOPIC_CF() throws Exception
-   {
+   public void testTOPIC_CF() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=TOPIC_CF"),
null);
 
       Assert.assertTrue(ActiveMQTopicConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testCF() throws Exception
-   {
+   public void testCF() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=CF"),
null);
 
       Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testNoCF() throws Exception
-   {
+   public void testNoCF() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true"),
null);
 
       Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testTCPAllProperties() throws Exception
-   {
+   public void testTCPAllProperties() throws Exception {
       StringBuilder sb = new StringBuilder();
       sb.append("tcp://localhost:3030?ha=true");
       BeanUtilsBean bean = new BeanUtilsBean();
@@ -110,8 +104,7 @@ public class ConnectionFactoryURITest
    }
 
    @Test
-   public void testTCPAllNettyConnectorProperties() throws Exception
-   {
+   public void testTCPAllNettyConnectorProperties() throws Exception {
       Map<String, Object> props = new HashMap<>();
       Set<String> allowableConnectorKeys = TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
       StringBuilder sb = new StringBuilder();
@@ -122,19 +115,15 @@ public class ConnectionFactoryURITest
       Map<String, Object> params = factory.getStaticConnectors()[0].getParams();
       Assert.assertEquals(params.get("host"), "localhost");
       Assert.assertEquals(params.get("port"), "3030");
-      for (Map.Entry<String, Object> entry : params.entrySet())
-      {
-         if (!entry.getKey().equals("host") && !entry.getKey().equals("port"))
-         {
+      for (Map.Entry<String, Object> entry : params.entrySet()) {
+         if (!entry.getKey().equals("host") && !entry.getKey().equals("port")) {
             Assert.assertEquals(entry.getValue(), props.get(entry.getKey()));
          }
       }
    }
 
-
    @Test
-   public void testTCPAllNettyConnectorPropertiesMultiple() throws Exception
-   {
+   public void testTCPAllNettyConnectorPropertiesMultiple() throws Exception {
       Map<String, Object> props = new HashMap<>();
       Set<String> allowableConnectorKeys = TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
       StringBuilder sb = new StringBuilder();
@@ -152,32 +141,28 @@ public class ConnectionFactoryURITest
 
       TransportConfiguration[] staticConnectors = factory.getStaticConnectors();
       Assert.assertEquals(3, staticConnectors.length);
-      checkTC(props, staticConnectors[0],0);
-      checkTC(props2, staticConnectors[1],1);
-      checkTC(props3, staticConnectors[2],2);
+      checkTC(props, staticConnectors[0], 0);
+      checkTC(props2, staticConnectors[1], 1);
+      checkTC(props3, staticConnectors[2], 2);
    }
 
-   private void checkTC(Map<String, Object> props, TransportConfiguration staticConnector,
int offfSet)
-   {
+   private void checkTC(Map<String, Object> props, TransportConfiguration staticConnector,
int offfSet) {
       TransportConfiguration connector = staticConnector;
       Assert.assertEquals(connector.getParams().get("host"), "localhost" + offfSet);
       Assert.assertEquals(connector.getParams().get("port"), "" + (61616 + offfSet));
       Map<String, Object> params = connector.getParams();
-      for (Map.Entry<String, Object> entry : params.entrySet())
-      {
-         if (!entry.getKey().equals("host") && !entry.getKey().equals("port"))
-         {
+      for (Map.Entry<String, Object> entry : params.entrySet()) {
+         if (!entry.getKey().equals("host") && !entry.getKey().equals("port")) {
             Assert.assertEquals(entry.getValue(), props.get(entry.getKey()));
          }
       }
    }
 
-   private void populateConnectorParams(Map<String, Object> props, Set<String>
allowableConnectorKeys, StringBuilder sb)
-   {
-      for (String allowableConnectorKey : allowableConnectorKeys)
-      {
-         if (!allowableConnectorKey.equals("host") && !allowableConnectorKey.equals("port"))
-         {
+   private void populateConnectorParams(Map<String, Object> props,
+                                        Set<String> allowableConnectorKeys,
+                                        StringBuilder sb) {
+      for (String allowableConnectorKey : allowableConnectorKeys) {
+         if (!allowableConnectorKey.equals("host") && !allowableConnectorKey.equals("port"))
{
             String value = RandomUtil.randomString();
             props.put(allowableConnectorKey, value);
             sb.append("&").append(allowableConnectorKey).append("=").append(value);
@@ -186,8 +171,7 @@ public class ConnectionFactoryURITest
    }
 
    @Test
-   public void testTCPURI() throws Exception
-   {
+   public void testTCPURI() throws Exception {
       TransportConfiguration tc = new TransportConfiguration(NettyConnectorFactory.class.getName());
       HashMap<String, Object> params = new HashMap<>();
       params.put("host", "localhost1");
@@ -205,16 +189,14 @@ public class ConnectionFactoryURITest
    }
 
    @Test
-   public void testUDP() throws Exception
-   {
+   public void testUDP() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("udp://localhost:3030?ha=true&type=QUEUE_XA_CF"),
null);
 
       Assert.assertTrue(ActiveMQXAQueueConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testUDPAllProperties() throws Exception
-   {
+   public void testUDPAllProperties() throws Exception {
       StringBuilder sb = new StringBuilder();
       sb.append("udp://localhost:3030?ha=true");
       BeanUtilsBean bean = new BeanUtilsBean();
@@ -225,15 +207,11 @@ public class ConnectionFactoryURITest
    }
 
    @Test
-   public void testUDPURI() throws Exception
-   {
+   public void testUDPURI() throws Exception {
       DiscoveryGroupConfiguration discoveryGroupConfiguration = new DiscoveryGroupConfiguration();
       UDPBroadcastEndpointFactory endpoint = new UDPBroadcastEndpointFactory();
       endpoint.setGroupPort(3333).setGroupAddress("wahey").setLocalBindPort(555).setLocalBindAddress("uhuh");
-      discoveryGroupConfiguration.setName("foo")
-            .setRefreshTimeout(12345)
-            .setDiscoveryInitialWaitTimeout(5678)
-            .setBroadcastEndpointFactory(endpoint);
+      discoveryGroupConfiguration.setName("foo").setRefreshTimeout(12345).setDiscoveryInitialWaitTimeout(5678).setBroadcastEndpointFactory(endpoint);
       ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(discoveryGroupConfiguration,
JMSFactoryType.CF);
       URI tcp = parser.createSchema("udp", connectionFactoryWithHA);
       ActiveMQConnectionFactory factory = parser.newObject(tcp, null);
@@ -252,22 +230,19 @@ public class ConnectionFactoryURITest
       Assert.assertEquals(dgc.getDiscoveryInitialWaitTimeout(), 5678);
       Assert.assertEquals(dgc.getRefreshTimeout(), 12345);
 
-
       BeanUtilsBean bean = new BeanUtilsBean();
       checkEquals(bean, connectionFactoryWithHA, factory);
    }
 
    @Test
-   public void testInvalidCFType() throws Exception
-   {
+   public void testInvalidCFType() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("udp://localhost:3030?ha=true&type=QUEUE_XA_CFInvalid"),
null);
 
       Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
    }
 
    @Test
-   public void testJGroupsFile() throws Exception
-   {
+   public void testJGroupsFile() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("jgroups://channel-name?file=/path/to/some/file/channel-file.xml&test=33"),
null);
 
       Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
@@ -277,8 +252,7 @@ public class ConnectionFactoryURITest
    }
 
    @Test
-   public void testJGroupsKeyValue() throws Exception
-   {
+   public void testJGroupsKeyValue() throws Exception {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("jgroups://channel-name?properties=param=value;param2=value2&test=33"),
null);
 
       Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
@@ -288,8 +262,7 @@ public class ConnectionFactoryURITest
    }
 
    @Test
-   public void testJGroupsAllProperties() throws Exception
-   {
+   public void testJGroupsAllProperties() throws Exception {
       StringBuilder sb = new StringBuilder();
       sb.append("jgroups://?file=param=value;param=value&channelName=channelName&ha=true");
       BeanUtilsBean bean = new BeanUtilsBean();
@@ -299,18 +272,11 @@ public class ConnectionFactoryURITest
       checkEquals(bean, factory, factory2);
    }
 
-
    @Test
-   public void testJGroupsFileURI() throws Exception
-   {
+   public void testJGroupsFileURI() throws Exception {
       DiscoveryGroupConfiguration discoveryGroupConfiguration = new DiscoveryGroupConfiguration();
-      JGroupsFileBroadcastEndpointFactory endpointFactory = new JGroupsFileBroadcastEndpointFactory()
-            .setChannelName("channel-name")
-            .setFile("channel-file.xml");
-      discoveryGroupConfiguration.setName("foo")
-            .setRefreshTimeout(12345)
-            .setDiscoveryInitialWaitTimeout(5678)
-            .setBroadcastEndpointFactory(endpointFactory);
+      JGroupsFileBroadcastEndpointFactory endpointFactory = new JGroupsFileBroadcastEndpointFactory().setChannelName("channel-name").setFile("channel-file.xml");
+      discoveryGroupConfiguration.setName("foo").setRefreshTimeout(12345).setDiscoveryInitialWaitTimeout(5678).setBroadcastEndpointFactory(endpointFactory);
       ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(discoveryGroupConfiguration,
JMSFactoryType.CF);
       URI tcp = parser.createSchema("jgroups", connectionFactoryWithHA);
       ActiveMQConnectionFactory factory = parser.newObject(tcp, null);
@@ -326,22 +292,15 @@ public class ConnectionFactoryURITest
       Assert.assertEquals(fileBroadcastEndpointFactory.getFile(), "channel-file.xml");
       Assert.assertEquals(fileBroadcastEndpointFactory.getChannelName(), "channel-name");
 
-
       BeanUtilsBean bean = new BeanUtilsBean();
       checkEquals(bean, connectionFactoryWithHA, factory);
    }
 
    @Test
-   public void testJGroupsPropertiesURI() throws Exception
-   {
+   public void testJGroupsPropertiesURI() throws Exception {
       DiscoveryGroupConfiguration discoveryGroupConfiguration = new DiscoveryGroupConfiguration();
-      JGroupsPropertiesBroadcastEndpointFactory endpointFactory = new JGroupsPropertiesBroadcastEndpointFactory()
-            .setChannelName("channel-name")
-            .setProperties("param=val,param2-val2");
-      discoveryGroupConfiguration.setName("foo")
-            .setRefreshTimeout(12345)
-            .setDiscoveryInitialWaitTimeout(5678)
-            .setBroadcastEndpointFactory(endpointFactory);
+      JGroupsPropertiesBroadcastEndpointFactory endpointFactory = new JGroupsPropertiesBroadcastEndpointFactory().setChannelName("channel-name").setProperties("param=val,param2-val2");
+      discoveryGroupConfiguration.setName("foo").setRefreshTimeout(12345).setDiscoveryInitialWaitTimeout(5678).setBroadcastEndpointFactory(endpointFactory);
       ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(discoveryGroupConfiguration,
JMSFactoryType.CF);
       URI tcp = parser.createSchema("jgroups", connectionFactoryWithHA);
       ActiveMQConnectionFactory factory = parser.newObject(tcp, null);
@@ -361,33 +320,28 @@ public class ConnectionFactoryURITest
       checkEquals(bean, connectionFactoryWithHA, factory);
    }
 
-   private void populate(StringBuilder sb, BeanUtilsBean bean, ActiveMQConnectionFactory
factory) throws IllegalAccessException, InvocationTargetException
-   {
+   private void populate(StringBuilder sb,
+                         BeanUtilsBean bean,
+                         ActiveMQConnectionFactory factory) throws IllegalAccessException,
InvocationTargetException {
       PropertyDescriptor[] descriptors = bean.getPropertyUtils().getPropertyDescriptors(factory);
-      for (PropertyDescriptor descriptor : descriptors)
-      {
-         if (descriptor.getWriteMethod() != null && descriptor.getReadMethod() !=
null)
-         {
-            if (descriptor.getPropertyType() == String.class)
-            {
+      for (PropertyDescriptor descriptor : descriptors) {
+         if (descriptor.getWriteMethod() != null && descriptor.getReadMethod() !=
null) {
+            if (descriptor.getPropertyType() == String.class) {
                String value = RandomUtil.randomString();
                bean.setProperty(factory, descriptor.getName(), value);
                sb.append("&").append(descriptor.getName()).append("=").append(value);
             }
-            else if (descriptor.getPropertyType() == int.class)
-            {
+            else if (descriptor.getPropertyType() == int.class) {
                int value = RandomUtil.randomPositiveInt();
                bean.setProperty(factory, descriptor.getName(), value);
                sb.append("&").append(descriptor.getName()).append("=").append(value);
             }
-            else if (descriptor.getPropertyType() == long.class)
-            {
+            else if (descriptor.getPropertyType() == long.class) {
                long value = RandomUtil.randomPositiveLong();
                bean.setProperty(factory, descriptor.getName(), value);
                sb.append("&").append(descriptor.getName()).append("=").append(value);
             }
-            else if (descriptor.getPropertyType() == double.class)
-            {
+            else if (descriptor.getPropertyType() == double.class) {
                double value = RandomUtil.randomDouble();
                bean.setProperty(factory, descriptor.getName(), value);
                sb.append("&").append(descriptor.getName()).append("=").append(value);
@@ -396,14 +350,13 @@ public class ConnectionFactoryURITest
       }
    }
 
-   private void checkEquals(BeanUtilsBean bean, ActiveMQConnectionFactory factory, ActiveMQConnectionFactory
factory2) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
-   {
+   private void checkEquals(BeanUtilsBean bean,
+                            ActiveMQConnectionFactory factory,
+                            ActiveMQConnectionFactory factory2) throws IllegalAccessException,
InvocationTargetException, NoSuchMethodException {
       PropertyDescriptor[] descriptors = bean.getPropertyUtils().getPropertyDescriptors(factory);
-      for (PropertyDescriptor descriptor : descriptors)
-      {
-         if (descriptor.getWriteMethod() != null && descriptor.getReadMethod() !=
null)
-         {
-            Assert.assertEquals(descriptor.getName() + " incorrect", bean.getProperty(factory,
descriptor.getName()),bean.getProperty(factory2, descriptor.getName()));
+      for (PropertyDescriptor descriptor : descriptors) {
+         if (descriptor.getWriteMethod() != null && descriptor.getReadMethod() !=
null) {
+            Assert.assertEquals(descriptor.getName() + " incorrect", bean.getProperty(factory,
descriptor.getName()), bean.getProperty(factory2, descriptor.getName()));
          }
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
index 76194a8..975c6a7 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
@@ -40,56 +40,55 @@ import org.jboss.logging.annotations.MessageLogger;
  * so an INFO message would be 341000 to 341999
  */
 @MessageLogger(projectCode = "AMQ")
-public interface ActiveMQJMSBridgeLogger extends BasicLogger
-{
+public interface ActiveMQJMSBridgeLogger extends BasicLogger {
+
    /**
     * The default logger.
     */
    ActiveMQJMSBridgeLogger LOGGER = Logger.getMessageLogger(ActiveMQJMSBridgeLogger.class,
ActiveMQJMSBridgeLogger.class.getPackage().getName());
 
    @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 341000, value = "Failed to set up JMS bridge connections. Most probably
the source or target servers are unavailable." +
-         " Will retry after a pause of {0} ms", format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 341000, value = "Failed to set up JMS bridge connections. Most probably
the source or target servers are unavailable." + " Will retry after a pause of {0} ms", format
= Message.Format.MESSAGE_FORMAT)
    void failedToSetUpBridge(long failureRetryInterval);
 
    @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 341001, value = "JMS Bridge Succeeded in reconnecting to servers" , format
= Message.Format.MESSAGE_FORMAT)
+   @Message(id = 341001, value = "JMS Bridge Succeeded in reconnecting to servers", format
= Message.Format.MESSAGE_FORMAT)
    void bridgeReconnected();
 
    @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 341002, value = "Succeeded in connecting to servers" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 341002, value = "Succeeded in connecting to servers", format = Message.Format.MESSAGE_FORMAT)
    void bridgeConnected();
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342000, value = "Attempt to start JMS Bridge, but is already started" ,
format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342000, value = "Attempt to start JMS Bridge, but is already started", format
= Message.Format.MESSAGE_FORMAT)
    void errorBridgeAlreadyStarted();
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342001, value = "Failed to start JMS Bridge" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342001, value = "Failed to start JMS Bridge", format = Message.Format.MESSAGE_FORMAT)
    void errorStartingBridge();
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342002, value = "Failed to unregisted JMS Bridge {0}" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342002, value = "Failed to unregisted JMS Bridge {0}", format = Message.Format.MESSAGE_FORMAT)
    void errorUnregisteringBridge(ObjectName objectName);
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342003, value = "JMS Bridge unable to set up connections, bridge will be
stopped" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342003, value = "JMS Bridge unable to set up connections, bridge will be
stopped", format = Message.Format.MESSAGE_FORMAT)
    void errorConnectingBridge();
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342004, value = "JMS Bridge Will retry after a pause of {0} ms" , format
= Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342004, value = "JMS Bridge Will retry after a pause of {0} ms", format
= Message.Format.MESSAGE_FORMAT)
    void bridgeRetry(long failureRetryInterval);
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342005, value = "JMS Bridge unable to set up connections, bridge will not
be started" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342005, value = "JMS Bridge unable to set up connections, bridge will not
be started", format = Message.Format.MESSAGE_FORMAT)
    void bridgeNotStarted();
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342006, value = "Detected failure on bridge connection" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342006, value = "Detected failure on bridge connection", format = Message.Format.MESSAGE_FORMAT)
    void bridgeFailure(@Cause Exception e);
 
    @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 342009, value = "JMS Bridge failed to send + acknowledge batch, closing
JMS objects"  , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 342009, value = "JMS Bridge failed to send + acknowledge batch, closing
JMS objects", format = Message.Format.MESSAGE_FORMAT)
    void bridgeAckError(@Cause Exception e);
 
    @LogMessage(level = Logger.Level.WARN)
@@ -97,10 +96,10 @@ public interface ActiveMQJMSBridgeLogger extends BasicLogger
    void bridgeConnectError(@Cause Exception e);
 
    @LogMessage(level = Logger.Level.ERROR)
-   @Message(id = 344001, value = "Failed to start source connection" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 344001, value = "Failed to start source connection", format = Message.Format.MESSAGE_FORMAT)
    void jmsBridgeSrcConnectError(@Cause Exception e);
 
    @LogMessage(level = Logger.Level.ERROR)
-   @Message(id = 344002, value = "Failed to start JMS Bridge.  QoS Mode: {0} requires a Transaction
Manager, none found" , format = Message.Format.MESSAGE_FORMAT)
+   @Message(id = 344002, value = "Failed to start JMS Bridge.  QoS Mode: {0} requires a Transaction
Manager, none found", format = Message.Format.MESSAGE_FORMAT)
    void jmsBridgeTransactionManagerMissing(QualityOfServiceMode qosMode);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ConnectionFactoryFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ConnectionFactoryFactory.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ConnectionFactoryFactory.java
index 41ea05f..e8cb003 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ConnectionFactoryFactory.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ConnectionFactoryFactory.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.jms.bridge;
 
-public interface ConnectionFactoryFactory
-{
+public interface ConnectionFactoryFactory {
+
    Object createConnectionFactory() throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/DestinationFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/DestinationFactory.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/DestinationFactory.java
index b538222..5b9bb5b 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/DestinationFactory.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/DestinationFactory.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.jms.bridge;
 
 import javax.jms.Destination;
 
-public interface DestinationFactory
-{
+public interface DestinationFactory {
+
    Destination createDestination() throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
index 3f0bab6..f42aa30 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
@@ -20,8 +20,8 @@ import javax.transaction.TransactionManager;
 
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 
-public interface JMSBridge extends ActiveMQComponent
-{
+public interface JMSBridge extends ActiveMQComponent {
+
    void pause() throws Exception;
 
    void resume() throws Exception;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridgeControl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridgeControl.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridgeControl.java
index 6079ca7..b32d0a4 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridgeControl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridgeControl.java
@@ -18,8 +18,8 @@ package org.apache.activemq.artemis.jms.bridge;
 
 import org.apache.activemq.artemis.api.core.management.ActiveMQComponentControl;
 
-public interface JMSBridgeControl extends ActiveMQComponentControl
-{
+public interface JMSBridgeControl extends ActiveMQComponentControl {
+
    void pause() throws Exception;
 
    void resume() throws Exception;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/QualityOfServiceMode.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/QualityOfServiceMode.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/QualityOfServiceMode.java
index b34d80f..fdf2aa3 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/QualityOfServiceMode.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/QualityOfServiceMode.java
@@ -64,34 +64,27 @@ package org.apache.activemq.artemis.jms.bridge;
  * using QOS_ONCE_AND_ONLY_ONCE but may be a good choice depending on your
  * specific application.
  */
-public enum QualityOfServiceMode
-{
+public enum QualityOfServiceMode {
    AT_MOST_ONCE(0), DUPLICATES_OK(1), ONCE_AND_ONLY_ONCE(2);
 
    private final int value;
 
-   QualityOfServiceMode(final int value)
-   {
+   QualityOfServiceMode(final int value) {
       this.value = value;
    }
 
-   public int intValue()
-   {
+   public int intValue() {
       return value;
    }
 
-   public static QualityOfServiceMode valueOf(final int value)
-   {
-      if (value == AT_MOST_ONCE.value)
-      {
+   public static QualityOfServiceMode valueOf(final int value) {
+      if (value == AT_MOST_ONCE.value) {
          return AT_MOST_ONCE;
       }
-      if (value == DUPLICATES_OK.value)
-      {
+      if (value == DUPLICATES_OK.value) {
          return DUPLICATES_OK;
       }
-      if (value == ONCE_AND_ONLY_ONCE.value)
-      {
+      if (value == ONCE_AND_ONLY_ONCE.value) {
          return ONCE_AND_ONLY_ONCE;
       }
       throw new IllegalArgumentException("invalid QualityOfServiceMode value: " + value);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java
index e2fa7f7..79b10d7 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java
@@ -22,198 +22,159 @@ import org.apache.activemq.artemis.jms.bridge.QualityOfServiceMode;
 
 import javax.management.StandardMBean;
 
-public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeControl
-{
+public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeControl {
 
    private final JMSBridge bridge;
 
    // Constructors --------------------------------------------------
 
-   public JMSBridgeControlImpl(final JMSBridge bridge) throws Exception
-   {
+   public JMSBridgeControlImpl(final JMSBridge bridge) throws Exception {
       super(JMSBridgeControl.class);
       this.bridge = bridge;
    }
 
    // Public --------------------------------------------------------
 
-   public void pause() throws Exception
-   {
+   public void pause() throws Exception {
       bridge.pause();
    }
 
-   public void resume() throws Exception
-   {
+   public void resume() throws Exception {
       bridge.resume();
    }
 
-   public boolean isStarted()
-   {
+   public boolean isStarted() {
       return bridge.isStarted();
    }
 
-   public void start() throws Exception
-   {
+   public void start() throws Exception {
       bridge.start();
    }
 
-   public void stop() throws Exception
-   {
+   public void stop() throws Exception {
       bridge.stop();
    }
 
-   public String getClientID()
-   {
+   public String getClientID() {
       return bridge.getClientID();
    }
 
-   public long getFailureRetryInterval()
-   {
+   public long getFailureRetryInterval() {
       return bridge.getFailureRetryInterval();
    }
 
-   public int getMaxBatchSize()
-   {
+   public int getMaxBatchSize() {
       return bridge.getMaxBatchSize();
    }
 
-   public long getMaxBatchTime()
-   {
+   public long getMaxBatchTime() {
       return bridge.getMaxBatchTime();
    }
 
-   public int getMaxRetries()
-   {
+   public int getMaxRetries() {
       return bridge.getMaxRetries();
    }
 
-   public String getQualityOfServiceMode()
-   {
+   public String getQualityOfServiceMode() {
       QualityOfServiceMode mode = bridge.getQualityOfServiceMode();
-      if (mode != null)
-      {
+      if (mode != null) {
          return mode.name();
       }
-      else
-      {
+      else {
          return null;
       }
    }
 
-   public String getSelector()
-   {
+   public String getSelector() {
       return bridge.getSelector();
    }
 
-   public String getSourcePassword()
-   {
+   public String getSourcePassword() {
       return bridge.getSourcePassword();
    }
 
-   public String getSourceUsername()
-   {
+   public String getSourceUsername() {
       return bridge.getSourceUsername();
    }
 
-   public String getSubscriptionName()
-   {
+   public String getSubscriptionName() {
       return bridge.getSubscriptionName();
    }
 
-   public String getTargetPassword()
-   {
+   public String getTargetPassword() {
       return bridge.getTargetPassword();
    }
 
-   public String getTargetUsername()
-   {
+   public String getTargetUsername() {
       return bridge.getTargetUsername();
    }
 
-   public boolean isAddMessageIDInHeader()
-   {
+   public boolean isAddMessageIDInHeader() {
       return bridge.isAddMessageIDInHeader();
    }
 
-   public boolean isFailed()
-   {
+   public boolean isFailed() {
       return bridge.isFailed();
    }
 
-   public boolean isPaused()
-   {
+   public boolean isPaused() {
       return bridge.isPaused();
    }
 
-   public void setAddMessageIDInHeader(final boolean value)
-   {
+   public void setAddMessageIDInHeader(final boolean value) {
       bridge.setAddMessageIDInHeader(value);
    }
 
-   public void setClientID(final String clientID)
-   {
+   public void setClientID(final String clientID) {
       bridge.setClientID(clientID);
    }
 
-   public void setFailureRetryInterval(final long interval)
-   {
+   public void setFailureRetryInterval(final long interval) {
       bridge.setFailureRetryInterval(interval);
    }
 
-   public void setMaxBatchSize(final int size)
-   {
+   public void setMaxBatchSize(final int size) {
       bridge.setMaxBatchSize(size);
    }
 
-   public void setMaxBatchTime(final long time)
-   {
+   public void setMaxBatchTime(final long time) {
       bridge.setMaxBatchTime(time);
    }
 
-   public void setMaxRetries(final int retries)
-   {
+   public void setMaxRetries(final int retries) {
       bridge.setMaxRetries(retries);
    }
 
-   public void setQualityOfServiceMode(String mode)
-   {
-      if (mode != null)
-      {
+   public void setQualityOfServiceMode(String mode) {
+      if (mode != null) {
          bridge.setQualityOfServiceMode(QualityOfServiceMode.valueOf(mode));
       }
-      else
-      {
+      else {
          mode = null;
       }
    }
 
-   public void setSelector(final String selector)
-   {
+   public void setSelector(final String selector) {
       bridge.setSelector(selector);
    }
 
-   public void setSourcePassword(final String pwd)
-   {
+   public void setSourcePassword(final String pwd) {
       bridge.setSourcePassword(pwd);
    }
 
-   public void setSourceUsername(final String name)
-   {
+   public void setSourceUsername(final String name) {
       bridge.setSourceUsername(name);
    }
 
-   public void setSubscriptionName(final String subname)
-   {
+   public void setSubscriptionName(final String subname) {
       bridge.setSubscriptionName(subname);
    }
 
-   public void setTargetPassword(final String pwd)
-   {
+   public void setTargetPassword(final String pwd) {
       bridge.setTargetPassword(pwd);
    }
 
-   public void setTargetUsername(final String name)
-   {
+   public void setTargetUsername(final String name) {
       bridge.setTargetUsername(name);
    }
 


Mime
View raw message