activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564679 [1/8] - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-core/src/main/java/org/apache/activemq/broker/ activemq-core/src/main/java/org/apache/activemq/broker/jmx/ activemq-core/src/main/java/org/apache/...
Date Fri, 10 Aug 2007 16:57:10 GMT
Author: chirino
Date: Fri Aug 10 09:57:01 2007
New Revision: 564679

URL: http://svn.apache.org/viewvc?view=rev&rev=564679
Log:
More checkstyle violation fixes

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorView.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueView.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchPolicy.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StrictOrderDispatchPolicy.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTopic.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseEndpoint.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Command.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataArrayResponse.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ExceptionResponse.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/IntegerResponse.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/WireFormatInfo.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/XATransactionId.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ConstantExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationFilter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MultiExpressionEvaluator.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NoLocalExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/UnaryExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ControlFile.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessorPool.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataManagerFacade.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/JournalFacade.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySetIterator.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataFile.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexItem.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeEntry.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntry.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntryList.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/MapCache.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageListener.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/DestinationBasedMessageList.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/ConnectionKey.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/ConnectionPool.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionState.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/TransactionState.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BlobJDBCAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/FrameTranslator.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedInputStream.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoading.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryIntPropertyEditor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryPropertyEditor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSslTransport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JndiJmsLogAppender.java
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContextSupport.java
    activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java Fri Aug 10 09:57:01 2007
@@ -61,8 +61,6 @@
     private ConsumerInfo consumerInfo;
     private boolean closed;
 
-    protected final List messageQueue = Collections.synchronizedList(new LinkedList());
-
     /**
      * Create a ConnectionConsumer
      * 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java Fri Aug 10 09:57:01 2007
@@ -118,6 +118,22 @@
         this(createURI(brokerURL));
     }
 
+    public ActiveMQConnectionFactory(URI brokerURL) {
+        setBrokerURL(brokerURL.toString());
+    }
+
+    public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
+        setUserName(userName);
+        setPassword(password);
+        setBrokerURL(brokerURL.toString());
+    }
+
+    public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
+        setUserName(userName);
+        setPassword(password);
+        setBrokerURL(brokerURL);
+    }
+
     /**
      * Returns a copy of the given connection factory
      */
@@ -142,22 +158,6 @@
         }
     }
 
-    public ActiveMQConnectionFactory(URI brokerURL) {
-        setBrokerURL(brokerURL.toString());
-    }
-
-    public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
-        setUserName(userName);
-        setPassword(password);
-        setBrokerURL(brokerURL.toString());
-    }
-
-    public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
-        setUserName(userName);
-        setPassword(password);
-        setBrokerURL(brokerURL);
-    }
-
     /**
      * @return Returns the Connection.
      */
@@ -252,8 +252,9 @@
 
             transport.start();
 
-            if (clientID != null)
+            if (clientID != null) {
                 connection.setDefaultClientID(clientID);
+            }
 
             return connection;
         } catch (JMSException e) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java Fri Aug 10 09:57:01 2007
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.HashMap;
+import java.util.Map;
 
 import javax.jms.IllegalStateException;
 import javax.jms.InvalidDestinationException;
@@ -100,7 +101,7 @@
 
         // Allows the options on the destination to configure the consumerInfo
         if (dest.getOptions() != null) {
-            HashMap options = new HashMap(dest.getOptions());
+            Map<String, String> options = new HashMap<String, String>(dest.getOptions());
             IntrospectionSupport.setProperties(this.info, options, "consumer.");
         }
 
@@ -145,8 +146,9 @@
             throw JMSExceptionSupport.create(e);
         }
 
-        if (md == null || unconsumedMessages.isClosed() || md.getMessage().isExpired())
+        if (md == null || unconsumedMessages.isClosed() || md.getMessage().isExpired()) {
             return null;
+        }
 
         deliveredCounter++;
         if ((0.75 * info.getPrefetchSize()) <= deliveredCounter) {
@@ -172,15 +174,17 @@
 
     public int read() throws IOException {
         fillBuffer();
-        if (eosReached)
+        if (eosReached) {
             return -1;
+        }
         return buffer[pos++] & 0xff;
     }
 
     public int read(byte[] b, int off, int len) throws IOException {
         fillBuffer();
-        if (eosReached)
+        if (eosReached) {
             return -1;
+        }
 
         int max = Math.min(len, buffer.length - pos);
         System.arraycopy(buffer, pos, b, off, max);
@@ -190,8 +194,9 @@
     }
 
     private void fillBuffer() throws IOException {
-        if (eosReached || (buffer != null && buffer.length > pos))
+        if (eosReached || (buffer != null && buffer.length > pos)) {
             return;
+        }
         try {
             while (true) {
                 ActiveMQMessage m = receive();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java Fri Aug 10 09:57:01 2007
@@ -16,9 +16,11 @@
  */
 package org.apache.activemq;
 
-import java.util.LinkedHashMap;
+import java.util.Map;
+
 import javax.jms.JMSException;
 import javax.jms.Message;
+
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.command.MessageId;
 import org.apache.activemq.command.ProducerId;
@@ -36,7 +38,7 @@
     private static final int DEFAULT_WINDOW_SIZE = 1024;
     private static final int MAXIMUM_PRODUCER_COUNT = 128;
     private int windowSize;
-    private LinkedHashMap<Object, BitArrayBin> map;
+    private Map<Object, BitArrayBin> map;
 
     /**
      * Default Constructor windowSize = 1024, maximumNumberOfProducersToTrack =

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java Fri Aug 10 09:57:01 2007
@@ -20,6 +20,7 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
@@ -178,7 +179,7 @@
 
         // Allows the options on the destination to configure the consumerInfo
         if (dest.getOptions() != null) {
-            HashMap options = new HashMap(dest.getOptions());
+            Map<String, String> options = new HashMap<String, String>(dest.getOptions());
             IntrospectionSupport.setProperties(this.info, options, "consumer.");
         }
 
@@ -208,8 +209,9 @@
             throw e;
         }
 
-        if (session.connection.isStarted())
+        if (session.connection.isStarted()) {
             start();
+        }
     }
 
     public StatsImpl getStats() {
@@ -345,13 +347,15 @@
         this.messageListener = listener;
         if (listener != null) {
             boolean wasRunning = session.isRunning();
-            if (wasRunning)
+            if (wasRunning) {
                 session.stop();
+            }
 
             session.redispatch(this, unconsumedMessages);
 
-            if (wasRunning)
+            if (wasRunning) {
                 session.start();
+            }
 
         }
     }
@@ -436,8 +440,9 @@
 
         sendPullCommand(0);
         MessageDispatch md = dequeue(-1);
-        if (md == null)
+        if (md == null) {
             return null;
+        }
 
         beforeMessageIsConsumed(md);
         afterMessageIsConsumed(md, false);
@@ -501,8 +506,9 @@
                 md = dequeue(timeout);
             }
 
-            if (md == null)
+            if (md == null) {
                 return null;
+            }
 
             beforeMessageIsConsumed(md);
             afterMessageIsConsumed(md, false);
@@ -532,8 +538,9 @@
             md = dequeue(0);
         }
 
-        if (md == null)
+        if (md == null) {
             return null;
+        }
 
         beforeMessageIsConsumed(md);
         afterMessageIsConsumed(md, false);
@@ -695,14 +702,16 @@
     }
 
     private void afterMessageIsConsumed(MessageDispatch md, boolean messageExpired) throws JMSException {
-        if (unconsumedMessages.isClosed())
+        if (unconsumedMessages.isClosed()) {
             return;
+        }
         if (messageExpired) {
             ackLater(md, MessageAck.DELIVERED_ACK_TYPE);
         } else {
             stats.onMessage();
-            if (session.isTransacted()) {
-            } else if (session.isAutoAcknowledge()) {
+            if( session.isTransacted() ) {
+                // Do nothing.
+            } else if(session.isAutoAcknowledge()) {
                 if (!deliveredMessages.isEmpty()) {
                     if (optimizeAcknowledge) {
                         if (deliveryingAcknowledgements.compareAndSet(false, true)) {
@@ -770,7 +779,8 @@
 
             // When using DUPS ok, we do a real ack.
             if (ackType == MessageAck.STANDARD_ACK_TYPE) {
-                deliveredCounter = additionalWindowSize = 0;
+                deliveredCounter = 0;
+                additionalWindowSize = 0;
             }
         }
     }
@@ -782,8 +792,9 @@
      * @throws JMSException
      */
     public void acknowledge() throws JMSException {
-        if (deliveredMessages.isEmpty())
+        if (deliveredMessages.isEmpty()) {
             return;
+        }
 
         // Acknowledge the last message.
         MessageDispatch lastMd = deliveredMessages.get(0);
@@ -822,13 +833,14 @@
                     }
                 }
             }
-            if (deliveredMessages.isEmpty())
+            if (deliveredMessages.isEmpty()) {
                 return;
+            } 
 
             // Only increase the redlivery delay after the first redelivery..
-            if (rollbackCounter > 0)
+            if (rollbackCounter > 0) {
                 redeliveryDelay = redeliveryPolicy.getRedeliveryDelay(redeliveryDelay);
-
+            }
             rollbackCounter++;
             if (redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES && rollbackCounter > redeliveryPolicy.getMaximumRedeliveries()) {
                 // We need to NACK the messages so that they get sent to the
@@ -858,8 +870,9 @@
                     Scheduler.executeAfterDelay(new Runnable() {
                         public void run() {
                             try {
-                                if (started.get())
+                                if (started.get()) {
                                     start();
+                                }
                             } catch (JMSException e) {
                                 session.connection.onAsyncException(e);
                             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java Fri Aug 10 09:57:01 2007
@@ -17,6 +17,7 @@
 package org.apache.activemq;
 
 import java.util.HashMap;
+import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
 
 import javax.jms.Destination;
@@ -70,10 +71,10 @@
 public class ActiveMQMessageProducer extends ActiveMQMessageProducerSupport implements StatsCapable, Disposable {
 
     protected ProducerInfo info;
+    protected boolean closed;
+
     private JMSProducerStatsImpl stats;
     private AtomicLong messageSequence;
-
-    protected boolean closed;
     private long startTime;
     private MessageTransformer transformer;
     private UsageManager producerWindow;
@@ -83,7 +84,7 @@
         this.info = new ProducerInfo(producerId);
         this.info.setWindowSize(session.connection.getProducerWindowSize());
         if (destination != null && destination.getOptions() != null) {
-            HashMap options = new HashMap(destination.getOptions());
+            Map<String, String> options = new HashMap<String, String>(destination.getOptions());
             IntrospectionSupport.setProperties(this.info, options, "producer.");
         }
         this.info.setDestination(destination);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java Fri Aug 10 09:57:01 2007
@@ -39,11 +39,12 @@
 public class ActiveMQOutputStream extends OutputStream implements Disposable {
 
     // Send down 64k messages.
-    final byte buffer[] = new byte[64 * 1024];
     protected int count;
 
+    final byte buffer[] = new byte[64 * 1024];
+
     private final ActiveMQConnection connection;
-    private final HashMap properties;
+    private final Map<String, Object> properties;
     private final ProducerInfo info;
 
     private long messageSequence;
@@ -52,13 +53,13 @@
     private final int priority;
     private final long timeToLive;
 
-    public ActiveMQOutputStream(ActiveMQConnection connection, ProducerId producerId, ActiveMQDestination destination, Map properties, int deliveryMode, int priority,
+    public ActiveMQOutputStream(ActiveMQConnection connection, ProducerId producerId, ActiveMQDestination destination, Map<String, Object> properties, int deliveryMode, int priority,
                                 long timeToLive) throws JMSException {
         this.connection = connection;
         this.deliveryMode = deliveryMode;
         this.priority = priority;
         this.timeToLive = timeToLive;
-        this.properties = properties == null ? null : new HashMap(properties);
+        this.properties = properties == null ? null : new HashMap<String, Object>(properties);
 
         if (destination == null) {
             throw new InvalidDestinationException("Don't understand null destinations");

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java Fri Aug 10 09:57:01 2007
@@ -109,8 +109,9 @@
     }
 
     private void destroyConsumer() {
-        if (consumer == null)
+        if (consumer == null) {
             return;
+        }
         try {
             consumer.close();
             consumer = null;
@@ -130,8 +131,9 @@
 
     public Enumeration getEnumeration() throws JMSException {
         checkClosed();
-        if (consumer == null)
+        if (consumer == null) {
             consumer = createConsumer();
+        }
         return this;
     }
 
@@ -148,8 +150,9 @@
         while (true) {
 
             synchronized (this) {
-                if (consumer == null)
+                if (consumer == null) {
                     return false;
+                }
             }
 
             if (consumer.getMessageSize() > 0) {
@@ -172,14 +175,16 @@
         while (true) {
 
             synchronized (this) {
-                if (consumer == null)
+                if (consumer == null) {
                     return null;
+                }
             }
 
             try {
                 Message answer = consumer.receiveNoWait();
-                if (answer != null)
+                if (answer != null) {
                     return answer;
+                }
             } catch (JMSException e) {
                 this.session.connection.onAsyncException(e);
                 return null;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java Fri Aug 10 09:57:01 2007
@@ -105,8 +105,9 @@
      * @throws JMSException
      */
     public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        if (destination instanceof Topic)
+        if (destination instanceof Topic) {
             throw new InvalidDestinationException("Topics are not supported by a QueueSession");
+        }
         return next.createConsumer(destination);
     }
 
@@ -117,8 +118,9 @@
      * @throws JMSException
      */
     public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException {
-        if (destination instanceof Topic)
+        if (destination instanceof Topic) {
             throw new InvalidDestinationException("Topics are not supported by a QueueSession");
+        }
         return next.createConsumer(destination, messageSelector);
     }
 
@@ -197,8 +199,9 @@
      * @throws JMSException
      */
     public MessageProducer createProducer(Destination destination) throws JMSException {
-        if (destination instanceof Topic)
+        if (destination instanceof Topic) {
             throw new InvalidDestinationException("Topics are not supported by a QueueSession");
+        }
         return next.createProducer(destination);
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java Fri Aug 10 09:57:01 2007
@@ -194,8 +194,8 @@
     protected final ActiveMQSessionExecutor executor = new ActiveMQSessionExecutor(this);
     protected final AtomicBoolean started = new AtomicBoolean(false);
 
-    protected final CopyOnWriteArrayList consumers = new CopyOnWriteArrayList();
-    protected final CopyOnWriteArrayList producers = new CopyOnWriteArrayList();
+    protected final CopyOnWriteArrayList<ActiveMQMessageConsumer> consumers = new CopyOnWriteArrayList<ActiveMQMessageConsumer>();
+    protected final CopyOnWriteArrayList<ActiveMQMessageProducer> producers = new CopyOnWriteArrayList<ActiveMQMessageProducer>();
 
     protected boolean closed;
     protected boolean asyncDispatch;
@@ -235,8 +235,9 @@
         setTransformer(connection.getTransformer());
         setBlobTransferPolicy(connection.getBlobTransferPolicy());
 
-        if (connection.isStarted())
+        if (connection.isStarted()) {
             start();
+        }
 
     }
 
@@ -495,7 +496,7 @@
      */
     public boolean getTransacted() throws JMSException {
         checkClosed();
-        return ((acknowledgementMode == Session.SESSION_TRANSACTED) || (transactionContext.isInXATransaction()));
+        return (acknowledgementMode == Session.SESSION_TRANSACTED) || (transactionContext.isInXATransaction());
     }
 
     /**
@@ -588,15 +589,15 @@
 
     void clearMessagesInProgress() {
         executor.clearMessagesInProgress();
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer consumer = iter.next();
             consumer.clearMessagesInProgress();
         }
     }
 
     void deliverAcks() {
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer consumer = iter.next();
             consumer.deliverAcks();
         }
     }
@@ -607,14 +608,14 @@
             try {
                 executor.stop();
 
-                for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-                    ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)iter.next();
+                for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+                    ActiveMQMessageConsumer consumer = iter.next();
                     consumer.dispose();
                 }
                 consumers.clear();
 
-                for (Iterator iter = producers.iterator(); iter.hasNext();) {
-                    ActiveMQMessageProducer producer = (ActiveMQMessageProducer)iter.next();
+                for (Iterator<ActiveMQMessageProducer> iter = producers.iterator(); iter.hasNext();) {
+                    ActiveMQMessageProducer producer = iter.next();
                     producer.dispose();
                 }
                 producers.clear();
@@ -684,8 +685,8 @@
             throw new IllegalStateException("This session is transacted");
         }
 
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             c.rollback();
         }
 
@@ -1422,8 +1423,8 @@
      * @see javax.jms.Session#CLIENT_ACKNOWLEDGE
      */
     public void acknowledge() throws JMSException {
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             c.acknowledge();
         }
     }
@@ -1486,8 +1487,8 @@
      */
     protected void start() throws JMSException {
         started.set(true);
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             c.start();
         }
         executor.start();
@@ -1500,8 +1501,8 @@
      */
     protected void stop() throws JMSException {
 
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             c.stop();
         }
 
@@ -1716,8 +1717,8 @@
         }
         Collections.reverse(c);
 
-        for (Iterator iter = c.iterator(); iter.hasNext();) {
-            MessageDispatch md = (MessageDispatch)iter.next();
+        for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) {
+            MessageDispatch md = iter.next();
             executor.executeFirst(md);
         }
 
@@ -1790,8 +1791,8 @@
         if (messageListener != null) {
             throw new IllegalStateException("Cannot synchronously receive a message when a MessageListener is set");
         }
-        for (Iterator i = consumers.iterator(); i.hasNext();) {
-            ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)i.next();
+        for (Iterator<ActiveMQMessageConsumer> i = consumers.iterator(); i.hasNext();) {
+            ActiveMQMessageConsumer consumer = i.next();
             if (consumer.getMessageListener() != null) {
                 throw new IllegalStateException("Cannot synchronously receive a message when a MessageListener is set");
             }
@@ -1799,15 +1800,15 @@
     }
 
     protected void setOptimizeAcknowledge(boolean value) {
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             c.setOptimizeAcknowledge(value);
         }
     }
 
     protected void setPrefetchSize(ConsumerId id, int prefetch) {
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             if (c.getConsumerId().equals(id)) {
                 c.setPrefetchSize(prefetch);
                 break;
@@ -1816,8 +1817,8 @@
     }
 
     protected void close(ConsumerId id) {
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             if (c.getConsumerId().equals(id)) {
                 try {
                     c.close();
@@ -1831,8 +1832,8 @@
     }
 
     public boolean isInUse(ActiveMQTempDestination destination) {
-        for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = (ActiveMQMessageConsumer)iter.next();
+        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
+            ActiveMQMessageConsumer c = iter.next();
             if (c.isInUse(destination)) {
                 return true;
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java Fri Aug 10 09:57:01 2007
@@ -42,8 +42,9 @@
 
     private static String extractMessage(IOException cause) {
         String m = cause.getMessage();
-        if (m == null || m.length() == 0)
+        if (m == null || m.length() == 0) {
             m = cause.toString();
+        }
         return m;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java Fri Aug 10 09:57:01 2007
@@ -19,11 +19,11 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
+import java.util.List;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.jms.JMSException;
 import javax.jms.TransactionInProgressException;
-import javax.jms.TransactionRolledBackException;
 import javax.transaction.xa.XAException;
 import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
@@ -65,12 +65,12 @@
     private static final Log LOG = LogFactory.getLog(TransactionContext.class);
 
     // XATransactionId -> ArrayList of TransactionContext objects
-    private static final ConcurrentHashMap ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap();
+    private static final ConcurrentHashMap<TransactionId, List<TransactionContext>> ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap<TransactionId, List<TransactionContext>>();
 
     private final ActiveMQConnection connection;
     private final LongSequenceGenerator localTransactionIdGenerator;
     private final ConnectionId connectionId;
-    private ArrayList synchornizations;
+    private List<Synchronization> synchornizations;
 
     // To track XA transactions.
     private Xid associatedXid;
@@ -116,19 +116,21 @@
     // ///////////////////////////////////////////////////////////
 
     public void addSynchronization(Synchronization s) {
-        if (synchornizations == null)
-            synchornizations = new ArrayList(10);
+        if (synchornizations == null) {
+            synchornizations = new ArrayList<Synchronization>(10);
+        }
         synchornizations.add(s);
     }
 
     private void afterRollback() throws JMSException {
-        if (synchornizations == null)
+        if (synchornizations == null) {
             return;
+        }
 
         int size = synchornizations.size();
         try {
             for (int i = 0; i < size; i++) {
-                ((Synchronization)synchornizations.get(i)).afterRollback();
+                synchornizations.get(i).afterRollback();
             }
         } catch (JMSException e) {
             throw e;
@@ -138,13 +140,14 @@
     }
 
     private void afterCommit() throws JMSException {
-        if (synchornizations == null)
+        if (synchornizations == null) {
             return;
+        }
 
         int size = synchornizations.size();
         try {
             for (int i = 0; i < size; i++) {
-                ((Synchronization)synchornizations.get(i)).afterCommit();
+                synchornizations.get(i).afterCommit();
             }
         } catch (JMSException e) {
             throw e;
@@ -154,13 +157,14 @@
     }
 
     private void beforeEnd() throws JMSException {
-        if (synchornizations == null)
+        if (synchornizations == null) {
             return;
+        }
 
         int size = synchornizations.size();
         try {
             for (int i = 0; i < size; i++) {
-                ((Synchronization)synchornizations.get(i)).beforeEnd();
+                synchornizations.get(i).beforeEnd();
             }
         } catch (JMSException e) {
             throw e;
@@ -184,9 +188,10 @@
      */
     public void begin() throws JMSException {
 
-        if (isInXATransaction())
+        if (isInXATransaction()) {
             throw new TransactionInProgressException("Cannot start local transaction.  XA transaction is already in progress.");
-
+        }
+        
         if (transactionId == null) {
             synchornizations = null;
             this.transactionId = new LocalTransactionId(connectionId, localTransactionIdGenerator.getNextSequenceId());
@@ -211,9 +216,10 @@
      *                 transacted session.
      */
     public void rollback() throws JMSException {
-        if (isInXATransaction())
+        if (isInXATransaction()) {
             throw new TransactionInProgressException("Cannot rollback() if an XA transaction is already in progress ");
-
+        }
+        
         if (transactionId != null) {
             TransactionInfo info = new TransactionInfo(getConnectionId(), transactionId, TransactionInfo.ROLLBACK);
             this.transactionId = null;
@@ -239,9 +245,10 @@
      *                 transacted session.
      */
     public void commit() throws JMSException {
-        if (isInXATransaction())
+        if (isInXATransaction()) {
             throw new TransactionInProgressException("Cannot commit() if an XA transaction is already in progress ");
-
+        }
+        
         beforeEnd();
 
         // Only send commit if the transaction was started.
@@ -299,12 +306,14 @@
 
     public void end(Xid xid, int flags) throws XAException {
 
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("End: " + xid);
-
-        if (isInLocalTransaction())
+        }
+        
+        if (isInLocalTransaction()) {
             throw new XAException(XAException.XAER_PROTO);
-
+        }
+        
         if ((flags & (TMSUSPEND | TMFAIL)) != 0) {
             // You can only suspend the associated xid.
             if (!equals(associatedXid, xid)) {
@@ -335,18 +344,21 @@
     }
 
     private boolean equals(Xid xid1, Xid xid2) {
-        if (xid1 == xid2)
+        if (xid1 == xid2) {
             return true;
-        if (xid1 == null ^ xid2 == null)
+        }
+        if (xid1 == null ^ xid2 == null) {
             return false;
+        }
         return xid1.getFormatId() == xid2.getFormatId() && Arrays.equals(xid1.getBranchQualifier(), xid2.getBranchQualifier())
                && Arrays.equals(xid1.getGlobalTransactionId(), xid2.getGlobalTransactionId());
     }
 
     public int prepare(Xid xid) throws XAException {
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Prepare: " + xid);
-
+        }
+        
         // We allow interleaving multiple transactions, so
         // we don't limit prepare to the associated xid.
         XATransactionId x;
@@ -373,9 +385,10 @@
 
     public void rollback(Xid xid) throws XAException {
 
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Rollback: " + xid);
-
+        }
+        
         // We allow interleaving multiple transactions, so
         // we don't limit rollback to the associated xid.
         XATransactionId x;
@@ -398,10 +411,10 @@
             TransactionInfo info = new TransactionInfo(getConnectionId(), x, TransactionInfo.ROLLBACK);
             this.connection.syncSendPacket(info);
 
-            ArrayList l = (ArrayList)ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
+            List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
             if (l != null && !l.isEmpty()) {
-                for (Iterator iter = l.iterator(); iter.hasNext();) {
-                    TransactionContext ctx = (TransactionContext)iter.next();
+                for (Iterator<TransactionContext> iter = l.iterator(); iter.hasNext();) {
+                    TransactionContext ctx = iter.next();
                     ctx.afterRollback();
                 }
             }
@@ -414,9 +427,10 @@
     // XAResource interface
     public void commit(Xid xid, boolean onePhase) throws XAException {
 
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Commit: " + xid);
-
+        }
+        
         // We allow interleaving multiple transactions, so
         // we don't limit commit to the associated xid.
         XATransactionId x;
@@ -437,7 +451,7 @@
 
             this.connection.syncSendPacket(info);
 
-            ArrayList l = (ArrayList)ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
+            List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
             if (l != null && !l.isEmpty()) {
                 for (Iterator iter = l.iterator(); iter.hasNext();) {
                     TransactionContext ctx = (TransactionContext)iter.next();
@@ -452,9 +466,10 @@
     }
 
     public void forget(Xid xid) throws XAException {
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Forget: " + xid);
-
+        }
+        
         // We allow interleaving multiple transactions, so
         // we don't limit forget to the associated xid.
         XATransactionId x;
@@ -494,9 +509,10 @@
     }
 
     public Xid[] recover(int flag) throws XAException {
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Recover: " + flag);
-
+        }
+        
         TransactionInfo info = new TransactionInfo(getConnectionId(), null, TransactionInfo.RECOVER);
         try {
             this.connection.checkClosedOrFailed();
@@ -551,8 +567,9 @@
             TransactionInfo info = new TransactionInfo(connectionId, transactionId, TransactionInfo.BEGIN);
             try {
                 this.connection.asyncSendPacket(info);
-                if (LOG.isDebugEnabled())
+                if (LOG.isDebugEnabled()) {
                     LOG.debug("Started XA transaction: " + transactionId);
+                }
             } catch (JMSException e) {
                 throw toXAException(e);
             }
@@ -563,17 +580,18 @@
                 TransactionInfo info = new TransactionInfo(connectionId, transactionId, TransactionInfo.END);
                 try {
                     this.connection.syncSendPacket(info);
-                    if (LOG.isDebugEnabled())
+                    if (LOG.isDebugEnabled()) {
                         LOG.debug("Ended XA transaction: " + transactionId);
+                    }
                 } catch (JMSException e) {
                     throw toXAException(e);
                 }
 
                 // Add our self to the list of contexts that are interested in
                 // post commit/rollback events.
-                ArrayList l = (ArrayList)ENDED_XA_TRANSACTION_CONTEXTS.get(transactionId);
+                List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.get(transactionId);
                 if (l == null) {
-                    l = new ArrayList(3);
+                    l = new ArrayList<TransactionContext>(3);
                     ENDED_XA_TRANSACTION_CONTEXTS.put(transactionId, l);
                     l.add(this);
                 } else if (!l.contains(this)) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java Fri Aug 10 09:57:01 2007
@@ -221,7 +221,7 @@
     /**
      * @return a Set of all durable destinations
      */
-    Set getDurableDestinations();
+    Set<ActiveMQDestination> getDurableDestinations();
 
     /**
      * Add and process a DestinationInfo object

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java Fri Aug 10 09:57:01 2007
@@ -95,11 +95,12 @@
  */
 public class BrokerService implements Service {
 
-    private static final Log LOG = LogFactory.getLog(BrokerService.class);
-    private static final long serialVersionUID = 7353129142305630237L;
     public static final String DEFAULT_PORT = "61616";
-    static final String DEFAULT_BROKER_NAME = "localhost";
     public static final String LOCAL_HOST_NAME;
+    public static final String DEFAULT_BROKER_NAME = "localhost";
+
+    private static final Log LOG = LogFactory.getLog(BrokerService.class);
+    private static final long serialVersionUID = 7353129142305630237L;
 
     private boolean useJmx = true;
     private boolean enableStatistics = true;
@@ -124,11 +125,11 @@
     private PersistenceAdapterFactory persistenceFactory;
     private DestinationFactory destinationFactory;
     private MessageAuthorizationPolicy messageAuthorizationPolicy;
-    private List transportConnectors = new CopyOnWriteArrayList();
-    private List networkConnectors = new CopyOnWriteArrayList();
-    private List proxyConnectors = new CopyOnWriteArrayList();
-    private List registeredMBeanNames = new CopyOnWriteArrayList();
-    private List jmsConnectors = new CopyOnWriteArrayList();
+    private List<TransportConnector> transportConnectors = new CopyOnWriteArrayList<TransportConnector>();
+    private List<NetworkConnector> networkConnectors = new CopyOnWriteArrayList<NetworkConnector>();
+    private List<ProxyConnector> proxyConnectors = new CopyOnWriteArrayList<ProxyConnector>();
+    private List<ObjectName> registeredMBeanNames = new CopyOnWriteArrayList<ObjectName>();
+    private List<JmsConnector> jmsConnectors = new CopyOnWriteArrayList<JmsConnector>();
     private Service[] services;
     private MasterConnector masterConnector;
     private String masterConnectorURI;
@@ -282,7 +283,7 @@
     public NetworkConnector addNetworkConnector(NetworkConnector connector) throws Exception {
         connector.setBrokerService(this);
         URI uri = getVmConnectorURI();
-        HashMap map = new HashMap(URISupport.parseParamters(uri));
+        Map<String, String> map = new HashMap<String, String>(URISupport.parseParamters(uri));
         map.put("network", "true");
         map.put("async", "false");
         uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
@@ -292,10 +293,10 @@
         // back connections.
         connector.setConnectionFilter(new ConnectionFilter() {
             public boolean connectTo(URI location) {
-                List transportConnectors = getTransportConnectors();
-                for (Iterator iter = transportConnectors.iterator(); iter.hasNext();) {
+                List<TransportConnector> transportConnectors = getTransportConnectors();
+                for (Iterator<TransportConnector> iter = transportConnectors.iterator(); iter.hasNext();) {
                     try {
-                        TransportConnector tc = (TransportConnector)iter.next();
+                        TransportConnector tc = iter.next();
                         if (location.equals(tc.getConnectUri())) {
                             return false;
                         }
@@ -470,8 +471,8 @@
         if (isUseJmx()) {
             MBeanServer mbeanServer = getManagementContext().getMBeanServer();
             if (mbeanServer != null) {
-                for (Iterator iter = registeredMBeanNames.iterator(); iter.hasNext();) {
-                    ObjectName name = (ObjectName)iter.next();
+                for (Iterator<ObjectName> iter = registeredMBeanNames.iterator(); iter.hasNext();) {
+                    ObjectName name = iter.next();
                     try {
                         mbeanServer.unregisterMBean(name);
                     } catch (Exception e) {
@@ -872,8 +873,8 @@
         this.advisorySupport = advisorySupport;
     }
 
-    public List getTransportConnectors() {
-        return new ArrayList(transportConnectors);
+    public List<TransportConnector> getTransportConnectors() {
+        return new ArrayList<TransportConnector>(transportConnectors);
     }
 
     /**
@@ -882,19 +883,19 @@
      * 
      * @org.apache.xbean.Property nestedType="org.apache.activemq.broker.TransportConnector"
      */
-    public void setTransportConnectors(List transportConnectors) throws Exception {
-        for (Iterator iter = transportConnectors.iterator(); iter.hasNext();) {
-            TransportConnector connector = (TransportConnector)iter.next();
+    public void setTransportConnectors(List<TransportConnector> transportConnectors) throws Exception {
+        for (Iterator<TransportConnector> iter = transportConnectors.iterator(); iter.hasNext();) {
+            TransportConnector connector = iter.next();
             addConnector(connector);
         }
     }
 
-    public List getNetworkConnectors() {
-        return new ArrayList(networkConnectors);
+    public List<NetworkConnector> getNetworkConnectors() {
+        return new ArrayList<NetworkConnector>(networkConnectors);
     }
 
-    public List getProxyConnectors() {
-        return new ArrayList(proxyConnectors);
+    public List<ProxyConnector> getProxyConnectors() {
+        return new ArrayList<ProxyConnector>(proxyConnectors);
     }
 
     /**
@@ -1182,24 +1183,24 @@
 
     protected void stopAllConnectors(ServiceStopper stopper) {
 
-        for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
-            NetworkConnector connector = (NetworkConnector)iter.next();
+        for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
+            NetworkConnector connector = iter.next();
             unregisterNetworkConnectorMBean(connector);
             stopper.stop(connector);
         }
 
-        for (Iterator iter = getProxyConnectors().iterator(); iter.hasNext();) {
-            ProxyConnector connector = (ProxyConnector)iter.next();
+        for (Iterator<ProxyConnector> iter = getProxyConnectors().iterator(); iter.hasNext();) {
+            ProxyConnector connector = iter.next();
             stopper.stop(connector);
         }
 
-        for (Iterator iter = jmsConnectors.iterator(); iter.hasNext();) {
-            JmsConnector connector = (JmsConnector)iter.next();
+        for (Iterator<JmsConnector> iter = jmsConnectors.iterator(); iter.hasNext();) {
+            JmsConnector connector = iter.next();
             stopper.stop(connector);
         }
 
-        for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
-            TransportConnector connector = (TransportConnector)iter.next();
+        for (Iterator<TransportConnector> iter = getTransportConnectors().iterator(); iter.hasNext();) {
+            TransportConnector connector = iter.next();
             stopper.stop(connector);
         }
     }
@@ -1584,10 +1585,10 @@
     protected void startAllConnectors() throws Exception {
         if (!isSlave()) {
 
-            ArrayList al = new ArrayList();
+            List<TransportConnector> al = new ArrayList<TransportConnector>();
 
-            for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
-                TransportConnector connector = (TransportConnector)iter.next();
+            for (Iterator<TransportConnector> iter = getTransportConnectors().iterator(); iter.hasNext();) {
+                TransportConnector connector = iter.next();
                 al.add(startTransportConnector(connector));
             }
 
@@ -1598,26 +1599,26 @@
                 setTransportConnectors(al);
             }
             URI uri = getVmConnectorURI();
-            HashMap map = new HashMap(URISupport.parseParamters(uri));
+            Map<String, String> map = new HashMap<String, String>(URISupport.parseParamters(uri));
             map.put("network", "true");
             map.put("async", "false");
             uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
 
-            for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
-                NetworkConnector connector = (NetworkConnector)iter.next();
+            for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
+                NetworkConnector connector = iter.next();
                 connector.setLocalUri(uri);
                 connector.setBrokerName(getBrokerName());
                 connector.setDurableDestinations(getBroker().getDurableDestinations());
                 connector.start();
             }
 
-            for (Iterator iter = getProxyConnectors().iterator(); iter.hasNext();) {
-                ProxyConnector connector = (ProxyConnector)iter.next();
+            for (Iterator<ProxyConnector> iter = getProxyConnectors().iterator(); iter.hasNext();) {
+                ProxyConnector connector = iter.next();
                 connector.start();
             }
 
-            for (Iterator iter = jmsConnectors.iterator(); iter.hasNext();) {
-                JmsConnector connector = (JmsConnector)iter.next();
+            for (Iterator<JmsConnector> iter = jmsConnectors.iterator(); iter.hasNext();) {
+                JmsConnector connector = iter.next();
                 connector.start();
             }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java Fri Aug 10 09:57:01 2007
@@ -23,6 +23,7 @@
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.command.ConnectionId;
 import org.apache.activemq.command.ConnectionInfo;
+import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.filter.MessageEvaluationContext;
 import org.apache.activemq.security.MessageAuthorizationPolicy;
@@ -41,7 +42,7 @@
     private Broker broker;
     private boolean inRecoveryMode;
     private Transaction transaction;
-    private ConcurrentHashMap transactions;
+    private ConcurrentHashMap<TransactionId, Transaction> transactions;
     private SecurityContext securityContext;
     private ConnectionId connectionId;
     private String clientId;
@@ -158,11 +159,11 @@
         this.inRecoveryMode = inRecoveryMode;
     }
 
-    public ConcurrentHashMap getTransactions() {
+    public ConcurrentHashMap<TransactionId, Transaction> getTransactions() {
         return transactions;
     }
 
-    public void setTransactions(ConcurrentHashMap transactions) {
+    public void setTransactions(ConcurrentHashMap<TransactionId, Transaction> transactions) {
         this.transactions = transactions;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java Fri Aug 10 09:57:01 2007
@@ -36,12 +36,13 @@
     public BrokerService createBroker(URI brokerURI) throws Exception {
 
         CompositeData compositeData = URISupport.parseComposite(brokerURI);
-        Map params = new HashMap(compositeData.getParameters());
+        Map<String, String> params = new HashMap<String, String>(compositeData.getParameters());
 
         BrokerService brokerService = new BrokerService();
         IntrospectionSupport.setProperties(brokerService, params);
-        if (compositeData.getPath() != null)
+        if (compositeData.getPath() != null) {
             brokerService.setBrokerName(compositeData.getPath());
+        }
 
         URI[] components = compositeData.getComponents();
         for (int i = 0; i < components.length; i++) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java?view=diff&rev=564679&r1=564678&r2=564679
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java Fri Aug 10 09:57:01 2007
@@ -19,6 +19,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -55,8 +56,8 @@
 
     // The prepared XA transactions.
     private TransactionStore transactionStore;
-    private Map xaTransactions = new LinkedHashMap();
-    ActiveMQMessageAudit audit;
+    private Map<TransactionId, Transaction> xaTransactions = new LinkedHashMap<TransactionId, Transaction>();
+    private ActiveMQMessageAudit audit;
 
     public TransactionBroker(Broker next, TransactionStore transactionStore) {
         super(next);
@@ -78,7 +79,7 @@
             final ConnectionContext context = new ConnectionContext();
             context.setBroker(this);
             context.setInRecoveryMode(true);
-            context.setTransactions(new ConcurrentHashMap());
+            context.setTransactions(new ConcurrentHashMap<TransactionId, Transaction>());
             context.setProducerFlowControl(false);
             final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
             producerExchange.setMutable(true);
@@ -119,12 +120,13 @@
     //
     // ////////////////////////////////////////////////////////////////////////////
     public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-        ArrayList txs = new ArrayList();
+        List<TransactionId> txs = new ArrayList<TransactionId>();
         synchronized (xaTransactions) {
-            for (Iterator iter = xaTransactions.values().iterator(); iter.hasNext();) {
-                Transaction tx = (Transaction)iter.next();
-                if (tx.isPrepared())
+            for (Iterator<Transaction> iter = xaTransactions.values().iterator(); iter.hasNext();) {
+                Transaction tx = iter.next();
+                if (tx.isPrepared()) {
                     txs.add(tx.getTransactionId());
+                }
             }
         }
         XATransactionId rc[] = new XATransactionId[txs.size()];
@@ -137,17 +139,19 @@
         if (xid.isXATransaction()) {
             Transaction transaction = null;
             synchronized (xaTransactions) {
-                transaction = (Transaction)xaTransactions.get(xid);
-                if (transaction != null)
+                transaction = xaTransactions.get(xid);
+                if (transaction != null) {
                     return;
+                }
                 transaction = new XATransaction(transactionStore, (XATransactionId)xid, this);
                 xaTransactions.put(xid, transaction);
             }
         } else {
-            Map transactionMap = context.getTransactions();
-            Transaction transaction = (Transaction)transactionMap.get(xid);
-            if (transaction != null)
+            Map<TransactionId, Transaction> transactionMap = context.getTransactions();
+            Transaction transaction = transactionMap.get(xid);
+            if (transaction != null) {
                 throw new JMSException("Transaction '" + xid + "' has already been started.");
+            }
             transaction = new LocalTransaction(transactionStore, (LocalTransactionId)xid, context);
             transactionMap.put(xid, transaction);
         }
@@ -229,9 +233,9 @@
     }
 
     public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        for (Iterator iter = context.getTransactions().values().iterator(); iter.hasNext();) {
+        for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) {
             try {
-                Transaction transaction = (Transaction)iter.next();
+                Transaction transaction = iter.next();
                 transaction.rollback();
             } catch (Exception e) {
                 LOG.warn("ERROR Rolling back disconnected client's transactions: ", e);
@@ -252,8 +256,9 @@
             transactionMap = xid.isXATransaction() ? xaTransactions : context.getTransactions();
         }
         Transaction transaction = (Transaction)transactionMap.get(xid);
-        if (transaction != null)
+        if (transaction != null) {
             return transaction;
+        }
         if (xid.isXATransaction()) {
             XAException e = new XAException("Transaction '" + xid + "' has not been started.");
             e.errorCode = XAException.XAER_NOTA;



Mime
View raw message