From commits-return-14549-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Wed Sep 01 21:57:29 2010 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 48858 invoked from network); 1 Sep 2010 21:57:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Sep 2010 21:57:29 -0000 Received: (qmail 2786 invoked by uid 500); 1 Sep 2010 21:57:29 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 2738 invoked by uid 500); 1 Sep 2010 21:57:29 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 2731 invoked by uid 99); 1 Sep 2010 21:57:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 21:57:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 21:57:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 80A2823888FD; Wed, 1 Sep 2010 21:56:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r991722 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp: ./ Commands/ Protocol/ State/ Threads/ Transport/ Transport/Failover/ Transport/Tcp/ Util/ Date: Wed, 01 Sep 2010 21:56:00 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100901215601.80A2823888FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Wed Sep 1 21:55:58 2010 New Revision: 991722 URL: http://svn.apache.org/viewvc?rev=991722&view=rev Log: code cleanup Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseDataStructure.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionError.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/KeepAliveInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveSubscriptionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionMetaData.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IOException.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageProducer.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/PrefetchPolicy.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/IPrimitiveMapMarshaler.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrameStream.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompHelper.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/XmlPrimitiveMapMarshaler.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionStateTracker.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConsumerState.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/DedicatedTaskRunner.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/TransactionContext.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/FutureResponse.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/LoggingTransport.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/MutexTransport.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/ResponseCorrelator.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransportFactory.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/TransportFactory.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/IdGenerator.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/MessageDispatchChannel.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/StompMessageTransformation.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/ThreadUtil.cs Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/BrokerException.cs Wed Sep 1 21:55:58 2010 @@ -27,7 +27,7 @@ namespace Apache.NMS.Stomp [Serializable] public class BrokerException : NMSException { - private BrokerError brokerError = null; + private readonly BrokerError brokerError; public BrokerException() : base("Broker failed with missing exception log") Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseDataStructure.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseDataStructure.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseDataStructure.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseDataStructure.cs Wed Sep 1 21:55:58 2010 @@ -16,7 +16,6 @@ */ using System; -using System.Text; using Apache.NMS.Stomp.Protocol; namespace Apache.NMS.Stomp.Commands @@ -69,10 +68,8 @@ namespace Apache.NMS.Stomp.Commands { return value.GetHashCode(); } - else - { - return -1; - } + + return -1; } public virtual Object Clone() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs Wed Sep 1 21:55:58 2010 @@ -16,7 +16,6 @@ */ using System; -using System.Collections; using Apache.NMS.Util; using Apache.NMS.Stomp.State; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs Wed Sep 1 21:55:58 2010 @@ -15,20 +15,18 @@ * limitations under the License. */ -using Apache.NMS; using Apache.NMS.Util; using System; -using System.Collections; using System.IO; namespace Apache.NMS.Stomp.Commands { public class BytesMessage : Message, IBytesMessage { - private EndianBinaryReader dataIn = null; - private EndianBinaryWriter dataOut = null; - private MemoryStream outputBuffer = null; - private int length = 0; + private EndianBinaryReader dataIn; + private EndianBinaryWriter dataOut; + private MemoryStream outputBuffer; + private int length; public override byte GetDataStructureType() { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionError.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionError.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionError.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionError.cs Wed Sep 1 21:55:58 2010 @@ -15,8 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - namespace Apache.NMS.Stomp.Commands { public class ConnectionId : BaseDataStructure @@ -91,12 +88,7 @@ namespace Apache.NMS.Stomp.Commands public virtual bool Equals(ConnectionId that) { - if(!Equals(this.Value, that.Value)) - { - return false; - } - - return true; + return Equals(this.Value, that.Value); } }; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,8 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerId.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerId.cs Wed Sep 1 21:55:58 2010 @@ -16,7 +16,6 @@ */ using System; -using System.Collections; namespace Apache.NMS.Stomp.Commands { @@ -26,7 +25,7 @@ namespace Apache.NMS.Stomp.Commands private string key; - private SessionId parentId = null; + private SessionId parentId; string connectionId; long sessionId; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConsumerInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,10 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - -using Apache.NMS; using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs Wed Sep 1 21:55:58 2010 @@ -185,21 +185,20 @@ namespace Apache.NMS.Stomp.Commands { return null; } - else if(type == STOMP_TOPIC) + else switch (type) { - result = new Topic(pyhsicalName); - } - else if(type == STOMP_TEMPORARY_TOPIC) - { - result = new TempTopic(pyhsicalName); - } - else if(type == STOMP_QUEUE) - { - result = new Queue(pyhsicalName); - } - else - { - result = new TempQueue(pyhsicalName); + case STOMP_TOPIC: + result = new Topic(pyhsicalName); + break; + case STOMP_TEMPORARY_TOPIC: + result = new TempTopic(pyhsicalName); + break; + case STOMP_QUEUE: + result = new Queue(pyhsicalName); + break; + default: + result = new TempQueue(pyhsicalName); + break; } return result; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - namespace Apache.NMS.Stomp.Commands { public class ExceptionResponse : Response Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/KeepAliveInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/KeepAliveInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/KeepAliveInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/KeepAliveInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.IO; -using Apache.NMS; using Apache.NMS.Util; using Apache.NMS.Stomp.Protocol; @@ -28,11 +25,11 @@ namespace Apache.NMS.Stomp.Commands private PrimitiveMap body; private PrimitiveMapInterceptor typeConverter; - public MapMessage() : base() + public MapMessage() { } - public MapMessage(PrimitiveMap body) : base() + public MapMessage(PrimitiveMap body) { this.body = body; this.typeConverter = new PrimitiveMapInterceptor(this, this.body); @@ -82,14 +79,7 @@ namespace Apache.NMS.Stomp.Commands set { this.body = value as PrimitiveMap; - if(value != null) - { - this.typeConverter = new PrimitiveMapInterceptor(this, value); - } - else - { - this.typeConverter = null; - } + this.typeConverter = value != null ? new PrimitiveMapInterceptor(this, value) : null; } } @@ -97,14 +87,7 @@ namespace Apache.NMS.Stomp.Commands { base.BeforeMarshall(wireFormat); - if(body == null) - { - this.Content = null; - } - else - { - this.Content = wireFormat.MapMarshaler.Marshal(body); - } + this.Content = body == null ? null : wireFormat.MapMarshaler.Marshal(body); } } } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs Wed Sep 1 21:55:58 2010 @@ -37,10 +37,6 @@ namespace Apache.NMS.Stomp.Commands return (Message) message; } - public Message() : base() - { - } - public override byte GetDataStructureType() { return DataStructureTypes.MessageType; @@ -50,14 +46,7 @@ namespace Apache.NMS.Stomp.Commands { MessageId id = this.MessageId; - if(id != null) - { - return id.GetHashCode(); - } - else - { - return base.GetHashCode(); - } + return id != null ? id.GetHashCode() : base.GetHashCode(); } public override bool Equals(object that) @@ -83,10 +72,8 @@ namespace Apache.NMS.Stomp.Commands { throw new NMSException("No Acknowledger has been associated with this message: " + this); } - else - { - Acknowledger(this); - } + + Acknowledger(this); } public virtual void ClearBody() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs Wed Sep 1 21:55:58 2010 @@ -16,7 +16,6 @@ */ using System; -using System.Collections; namespace Apache.NMS.Stomp.Commands { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs Wed Sep 1 21:55:58 2010 @@ -16,7 +16,6 @@ */ using System; -using System.Collections; namespace Apache.NMS.Stomp.Commands { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,8 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveSubscriptionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveSubscriptionInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveSubscriptionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveSubscriptionInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,8 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs Wed Sep 1 21:55:58 2010 @@ -15,12 +15,8 @@ * limitations under the License. */ -using System; -using System.Collections; - namespace Apache.NMS.Stomp.Commands { - public class Response : BaseCommand { int correlationId; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - namespace Apache.NMS.Stomp.Commands { public class SessionId : BaseDataStructure Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs Wed Sep 1 21:55:58 2010 @@ -17,19 +17,16 @@ using System; using System.IO; -using System.Collections; -using Apache.NMS; using Apache.NMS.Util; -using Apache.NMS.Stomp; namespace Apache.NMS.Stomp.Commands { public class StreamMessage : Message, IStreamMessage { - private EndianBinaryReader dataIn = null; - private EndianBinaryWriter dataOut = null; - private MemoryStream byteBuffer = null; + private EndianBinaryReader dataIn; + private EndianBinaryWriter dataOut; + private MemoryStream byteBuffer; private int bytesRemaining = -1; public override byte GetDataStructureType() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,11 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - -using Apache.NMS.Stomp.State; - namespace Apache.NMS.Stomp.Commands { public class SubscriptionInfo : BaseDataStructure Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs Wed Sep 1 21:55:58 2010 @@ -49,12 +49,12 @@ namespace Apache.NMS.Stomp.Commands public const byte ID_ActiveMQTempDestination = 0; - public TempDestination() + protected TempDestination() : base() { } - public TempDestination(String name) + protected TempDestination(String name) : base(name) { } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs Wed Sep 1 21:55:58 2010 @@ -16,17 +16,14 @@ */ using System; -using System.IO; -using Apache.NMS; -using Apache.NMS.Util; using Apache.NMS.Stomp.Protocol; namespace Apache.NMS.Stomp.Commands { public class TextMessage : Message, ITextMessage { - private String text = null; + private String text; public TextMessage() { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - namespace Apache.NMS.Stomp.Commands { public class TransactionId : BaseDataStructure Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs Wed Sep 1 21:55:58 2010 @@ -15,9 +15,6 @@ * limitations under the License. */ -using System; -using System.Collections; - using Apache.NMS.Stomp.State; namespace Apache.NMS.Stomp.Commands Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs Wed Sep 1 21:55:58 2010 @@ -21,7 +21,6 @@ using System.Collections.Specialized; using System.Threading; using Apache.NMS.Stomp.Commands; using Apache.NMS.Stomp.Transport; -using Apache.NMS.Stomp.Transport.Failover; using Apache.NMS.Stomp.Util; using Apache.NMS.Util; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs Wed Sep 1 21:55:58 2010 @@ -18,9 +18,7 @@ using System; using System.Collections.Specialized; using Apache.NMS.Stomp.Util; -using Apache.NMS.Stomp.Commands; using Apache.NMS.Stomp.Transport; -using Apache.NMS; using Apache.NMS.Util; using Apache.NMS.Policies; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionMetaData.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionMetaData.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionMetaData.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionMetaData.cs Wed Sep 1 21:55:58 2010 @@ -17,7 +17,6 @@ using System; using System.Reflection; -using Apache.NMS; namespace Apache.NMS.Stomp { @@ -26,17 +25,17 @@ namespace Apache.NMS.Stomp /// public class ConnectionMetaData : IConnectionMetaData { - private int nmsMajorVersion; - private int nmsMinorVersion; + private readonly int nmsMajorVersion; + private readonly int nmsMinorVersion; - private string nmsProviderName; - private string nmsVersion; + private readonly string nmsProviderName; + private readonly string nmsVersion; - private int providerMajorVersion; - private int providerMinorVersion; - private string providerVersion; + private readonly int providerMajorVersion; + private readonly int providerMinorVersion; + private readonly string providerVersion; - private string[] nmsxProperties; + private readonly string[] nmsxProperties; public ConnectionMetaData() { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs Wed Sep 1 21:55:58 2010 @@ -15,7 +15,6 @@ * limitations under the License. */ -using System; using Apache.NMS.Stomp.Commands; namespace Apache.NMS.Stomp Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IOException.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IOException.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IOException.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IOException.cs Wed Sep 1 21:55:58 2010 @@ -17,10 +17,6 @@ using System; -using Apache.NMS.Stomp.Commands; -using System.Text; -using Apache.NMS; - namespace Apache.NMS.Stomp { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs Wed Sep 1 21:55:58 2010 @@ -16,11 +16,9 @@ */ using System; using System.Threading; -using System.Collections; using System.Collections.Generic; using Apache.NMS.Stomp.Commands; using Apache.NMS.Stomp.Util; -using Apache.NMS; using Apache.NMS.Util; namespace Apache.NMS.Stomp Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageProducer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageProducer.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageProducer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageProducer.cs Wed Sep 1 21:55:58 2010 @@ -19,7 +19,6 @@ using System; using System.Threading; using Apache.NMS.Util; using Apache.NMS.Stomp.Commands; -using Apache.NMS.Stomp.Util; namespace Apache.NMS.Stomp { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/PrefetchPolicy.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/PrefetchPolicy.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/PrefetchPolicy.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/PrefetchPolicy.cs Wed Sep 1 21:55:58 2010 @@ -15,8 +15,6 @@ * limitations under the License. */ using System; -using Apache.NMS; -using Apache.NMS.Util; namespace Apache.NMS.Stomp { @@ -84,7 +82,7 @@ namespace Apache.NMS.Stomp this.durableTopicPrefetch = value; } - private int RestrictToMaximum(int value) + private static int RestrictToMaximum(int value) { return System.Math.Min(value, MAX_PREFETCH_SIZE); } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/IPrimitiveMapMarshaler.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/IPrimitiveMapMarshaler.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/IPrimitiveMapMarshaler.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/IPrimitiveMapMarshaler.cs Wed Sep 1 21:55:58 2010 @@ -16,9 +16,6 @@ // */ // -using System; -using Apache.NMS.Util; - namespace Apache.NMS.Stomp.Protocol { /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs Wed Sep 1 21:55:58 2010 @@ -21,8 +21,6 @@ using System.Collections; using System.IO; using System.Text; -using Apache.NMS; - namespace Apache.NMS.Stomp.Protocol { public class StompFrame @@ -38,7 +36,7 @@ namespace Apache.NMS.Stomp.Protocol private IDictionary properties = new Hashtable(); private byte[] content; - private Encoding encoding = new UTF8Encoding(); + private readonly Encoding encoding = new UTF8Encoding(); public StompFrame() { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrameStream.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrameStream.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrameStream.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrameStream.cs Wed Sep 1 21:55:58 2010 @@ -14,15 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using System.Reflection; -using Apache.NMS.Stomp.Commands; -using Apache.NMS.Stomp.Transport; -using Apache.NMS; + using System; -using System.Collections; using System.IO; using System.Text; +using Apache.NMS.Stomp.Commands; + namespace Apache.NMS.Stomp.Protocol { /// @@ -37,11 +35,11 @@ namespace Apache.NMS.Stomp.Protocol /// Used to mark the End of the Frame. public const byte FRAME_TERMINUS = (byte) 0; - private StringBuilder builder = new StringBuilder(); - private BinaryWriter ds; + private readonly StringBuilder builder = new StringBuilder(); + private readonly BinaryWriter ds; private byte[] content; private int contentLength = -1; - private Encoding encoding; + private readonly Encoding encoding; public StompFrameStream(BinaryWriter ds, Encoding encoding) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompHelper.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompHelper.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompHelper.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompHelper.cs Wed Sep 1 21:55:58 2010 @@ -14,10 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using System; -using System.Text; + using Apache.NMS.Stomp.Commands; -using Apache.NMS; namespace Apache.NMS.Stomp.Protocol { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs Wed Sep 1 21:55:58 2010 @@ -16,10 +16,8 @@ */ using Apache.NMS.Stomp.Commands; using Apache.NMS.Stomp.Transport; -using Apache.NMS; using Apache.NMS.Util; using System; -using System.Collections; using System.IO; using System.Text; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/XmlPrimitiveMapMarshaler.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/XmlPrimitiveMapMarshaler.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/XmlPrimitiveMapMarshaler.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/XmlPrimitiveMapMarshaler.cs Wed Sep 1 21:55:58 2010 @@ -30,13 +30,13 @@ namespace Apache.NMS.Stomp.Protocol /// public class XmlPrimitiveMapMarshaler : IPrimitiveMapMarshaler { - private Encoding encoder = new UTF8Encoding(); + private readonly Encoding encoder = new UTF8Encoding(); - public XmlPrimitiveMapMarshaler() : base() + public XmlPrimitiveMapMarshaler() { } - public XmlPrimitiveMapMarshaler(Encoding encoder) : base() + public XmlPrimitiveMapMarshaler(Encoding encoder) { this.encoder = encoder; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs Wed Sep 1 21:55:58 2010 @@ -55,7 +55,7 @@ namespace Apache.NMS.Stomp private bool closed = false; private bool closing = false; private TimeSpan requestTimeout; - private AcknowledgementMode acknowledgementMode; + private readonly AcknowledgementMode acknowledgementMode; public Session(Connection connection, SessionInfo info, AcknowledgementMode acknowledgementMode, bool dispatchAsync) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs Wed Sep 1 21:55:58 2010 @@ -25,9 +25,9 @@ namespace Apache.NMS.Stomp.State { ConnectionInfo info; - private AtomicDictionary consumers = + private readonly AtomicDictionary consumers = new AtomicDictionary(); - private Atomic _shutdown = new Atomic(false); + private readonly Atomic _shutdown = new Atomic(false); public ConnectionState(ConnectionInfo info) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionStateTracker.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionStateTracker.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionStateTracker.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionStateTracker.cs Wed Sep 1 21:55:58 2010 @@ -29,8 +29,7 @@ namespace Apache.NMS.Stomp.State /// public class ConnectionStateTracker : CommandVisitorAdapter { - - private static Tracked TRACKED_RESPONSE_MARKER = new Tracked(null); + private static readonly Tracked TRACKED_RESPONSE_MARKER = new Tracked(null); protected Dictionary connectionStates = new Dictionary(); Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConsumerState.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConsumerState.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConsumerState.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConsumerState.cs Wed Sep 1 21:55:58 2010 @@ -24,7 +24,7 @@ namespace Apache.NMS.Stomp.State public class ConsumerState { - ConsumerInfo info; + readonly ConsumerInfo info; public ConsumerState(ConsumerInfo info) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs Wed Sep 1 21:55:58 2010 @@ -15,7 +15,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Generic; @@ -24,7 +23,7 @@ namespace Apache.NMS.Stomp.State public class AtomicCollection where TValue : class { - private ArrayList _collection = new ArrayList(); + private readonly ArrayList _collection = new ArrayList(); public AtomicCollection() { @@ -151,7 +150,7 @@ namespace Apache.NMS.Stomp.State where TKey : class where TValue : class { - private Dictionary _dictionary = new Dictionary(); + private readonly Dictionary _dictionary = new Dictionary(); public void Clear() { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/DedicatedTaskRunner.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/DedicatedTaskRunner.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/DedicatedTaskRunner.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/DedicatedTaskRunner.cs Wed Sep 1 21:55:58 2010 @@ -28,12 +28,12 @@ namespace Apache.NMS.Stomp.Threads private readonly Mutex mutex = new Mutex(); private readonly AutoResetEvent waiter = new AutoResetEvent(false); private readonly ManualResetEvent isShutdown = new ManualResetEvent(true); - private Thread theThread = null; - private Task task = null; + private readonly Thread theThread; + private readonly Task task; - private bool terminated = false; - private bool pending = false; - private bool shutdown = false; + private bool terminated; + private bool pending; + private bool shutdown; public DedicatedTaskRunner(Task task) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/TransactionContext.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/TransactionContext.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/TransactionContext.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/TransactionContext.cs Wed Sep 1 21:55:58 2010 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using Apache.NMS.Stomp; + using Apache.NMS.Stomp.Commands; using System.Collections; @@ -31,8 +31,8 @@ namespace Apache.NMS.Stomp public class TransactionContext { private TransactionId transactionId; - private Session session; - private ArrayList synchronizations = ArrayList.Synchronized(new ArrayList()); + private readonly Session session; + private readonly ArrayList synchronizations = ArrayList.Synchronized(new ArrayList()); public TransactionContext(Session session) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs Wed Sep 1 21:55:58 2010 @@ -22,7 +22,6 @@ using System.Threading; using Apache.NMS.Stomp.Commands; using Apache.NMS.Stomp.State; using Apache.NMS.Stomp.Threads; -using Apache.NMS.Stomp.Util; using Apache.NMS.Util; namespace Apache.NMS.Stomp.Transport.Failover @@ -34,24 +33,24 @@ namespace Apache.NMS.Stomp.Transport.Fai public class FailoverTransport : ICompositeTransport, IComparable { private static int idCounter = 0; - private int id; + private readonly int id; private bool disposed; private bool connected; - private List uris = new List(); + private readonly List uris = new List(); private CommandHandler commandHandler; private ExceptionHandler exceptionHandler; private InterruptedHandler interruptedHandler; private ResumedHandler resumedHandler; - private Mutex reconnectMutex = new Mutex(); - private Mutex sleepMutex = new Mutex(); - private ConnectionStateTracker stateTracker = new ConnectionStateTracker(); - private Dictionary requestMap = new Dictionary(); + private readonly Mutex reconnectMutex = new Mutex(); + private readonly Mutex sleepMutex = new Mutex(); + private readonly ConnectionStateTracker stateTracker = new ConnectionStateTracker(); + private readonly Dictionary requestMap = new Dictionary(); private Uri connectedTransportURI; private Uri failedConnectTransportURI; - private AtomicReference connectedTransport = new AtomicReference(null); + private readonly AtomicReference connectedTransport = new AtomicReference(null); private TaskRunner reconnectTask = null; private bool started; @@ -83,7 +82,7 @@ namespace Apache.NMS.Stomp.Transport.Fai private class FailoverTask : Task { - private FailoverTransport parent; + private readonly FailoverTransport parent; public FailoverTask(FailoverTransport p) { @@ -235,7 +234,7 @@ namespace Apache.NMS.Stomp.Transport.Fai /// /// /// Returns true if the command is one sent when a connection is being closed. - private bool IsShutdownCommand(Command command) + private static bool IsShutdownCommand(Command command) { return (command != null && (command.IsShutdownInfo || command is RemoveInfo)); } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/FutureResponse.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/FutureResponse.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/FutureResponse.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/FutureResponse.cs Wed Sep 1 21:55:58 2010 @@ -18,7 +18,6 @@ using Apache.NMS.Stomp.Commands; using System; using System.Threading; -using Apache.NMS; using Apache.NMS.Util; namespace Apache.NMS.Stomp.Transport Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs Wed Sep 1 21:55:58 2010 @@ -31,14 +31,14 @@ namespace Apache.NMS.Stomp.Transport /// public class InactivityMonitor : TransportFilter { - private Atomic monitorStarted = new Atomic(false); + private readonly Atomic monitorStarted = new Atomic(false); - private Atomic commandSent = new Atomic(false); - private Atomic commandReceived = new Atomic(false); + private readonly Atomic commandSent = new Atomic(false); + private readonly Atomic commandReceived = new Atomic(false); - private Atomic failed = new Atomic(false); - private Atomic inRead = new Atomic(false); - private Atomic inWrite = new Atomic(false); + private readonly Atomic failed = new Atomic(false); + private readonly Atomic inRead = new Atomic(false); + private readonly Atomic inWrite = new Atomic(false); private DedicatedTaskRunner asyncTask; private AsyncWriteTask asyncWriteTask; @@ -227,7 +227,7 @@ namespace Apache.NMS.Stomp.Transport // Task that fires when the TaskRunner is signaled by the WriteCheck Timer Task. class AsyncWriteTask : Task { - private InactivityMonitor parent; + private readonly InactivityMonitor parent; public AsyncWriteTask(InactivityMonitor parent) { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/LoggingTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/LoggingTransport.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/LoggingTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/LoggingTransport.cs Wed Sep 1 21:55:58 2010 @@ -14,9 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using Apache.NMS; + using Apache.NMS.Stomp.Commands; -using Apache.NMS.Stomp.Transport; using System; namespace Apache.NMS.Stomp.Transport Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/MutexTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/MutexTransport.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/MutexTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/MutexTransport.cs Wed Sep 1 21:55:58 2010 @@ -15,7 +15,6 @@ * limitations under the License. */ using Apache.NMS.Stomp.Commands; -using Apache.NMS.Stomp.Transport; using System; namespace Apache.NMS.Stomp.Transport Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/ResponseCorrelator.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/ResponseCorrelator.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/ResponseCorrelator.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/ResponseCorrelator.cs Wed Sep 1 21:55:58 2010 @@ -20,8 +20,6 @@ using System.Threading; using System.Collections; using Apache.NMS.Stomp.Commands; -using Apache.NMS.Stomp.Transport; -using Apache.NMS; namespace Apache.NMS.Stomp.Transport { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs Wed Sep 1 21:55:58 2010 @@ -19,7 +19,6 @@ using System; using System.IO; -using System.Net; using System.Net.Sockets; using System.Net.Security; using System.Security.Authentication; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransportFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransportFactory.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransportFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/SslTransportFactory.cs Wed Sep 1 21:55:58 2010 @@ -16,7 +16,6 @@ */ using System; -using System.Net; using System.Net.Sockets; namespace Apache.NMS.Stomp.Transport.Tcp @@ -31,10 +30,6 @@ namespace Apache.NMS.Stomp.Transport.Tcp private string keyStoreLocation; private bool acceptInvalidBrokerCert = false; - public SslTransportFactory() : base() - { - } - public string ServerName { get { return this.serverName; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs Wed Sep 1 21:55:58 2010 @@ -37,9 +37,9 @@ namespace Apache.NMS.Stomp.Transport.Tcp private Thread readThread; private bool started; private bool disposed = false; - private Atomic closed = new Atomic(false); + private readonly Atomic closed = new Atomic(false); private volatile bool seenShutdown; - private Uri connectedUri; + private readonly Uri connectedUri; private CommandHandler commandHandler; private ExceptionHandler exceptionHandler; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs Wed Sep 1 21:55:58 2010 @@ -26,13 +26,9 @@ namespace Apache.NMS.Stomp.Transport.Tcp { public class TcpTransportFactory : ITransportFactory { - public TcpTransportFactory() - { - } - #region Properties - private bool useLogging = false; + private bool useLogging; public bool UseLogging { get { return useLogging; } @@ -73,7 +69,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp /// The time-out value, in milliseconds. The default value is 0, which indicates /// an infinite time-out period. Specifying -1 also indicates an infinite time-out period. /// - private int receiveTimeout = 0; + private int receiveTimeout; public int ReceiveTimeout { get { return receiveTimeout; } @@ -85,7 +81,7 @@ namespace Apache.NMS.Stomp.Transport.Tcp /// the value will be changed to 500. The default value is 0, which indicates an infinite /// time-out period. Specifying -1 also indicates an infinite time-out period. /// - private int sendTimeout = 0; + private int sendTimeout; public int SendTimeout { get { return sendTimeout; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/TransportFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/TransportFactory.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/TransportFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/TransportFactory.cs Wed Sep 1 21:55:58 2010 @@ -67,7 +67,7 @@ namespace Apache.NMS.Stomp.Transport { string scheme = location.Scheme; - if(null == scheme || 0 == scheme.Length) + if(string.IsNullOrEmpty(scheme)) { throw new NMSConnectionException(String.Format("Transport scheme invalid: [{0}]", location.ToString())); } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/IdGenerator.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/IdGenerator.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/IdGenerator.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/IdGenerator.cs Wed Sep 1 21:55:58 2010 @@ -24,10 +24,10 @@ namespace Apache.NMS.Stomp.Util { public class IdGenerator { - private static String UNIQUE_STUB; + private static readonly String UNIQUE_STUB; private static int instanceCount; - private static String hostName; - private String seed; + private static readonly String hostName; + private readonly String seed; private long sequence; static IdGenerator() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/MessageDispatchChannel.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/MessageDispatchChannel.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/MessageDispatchChannel.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/MessageDispatchChannel.cs Wed Sep 1 21:55:58 2010 @@ -17,11 +17,8 @@ using System; using System.Threading; -using System.Collections; using System.Collections.Generic; using Apache.NMS.Stomp.Commands; -using Apache.NMS; -using Apache.NMS.Util; namespace Apache.NMS.Stomp.Util { @@ -31,7 +28,7 @@ namespace Apache.NMS.Stomp.Util private readonly ManualResetEvent waiter = new ManualResetEvent(false); private bool closed; private bool running; - private LinkedList channel = new LinkedList(); + private readonly LinkedList channel = new LinkedList(); #region Properties Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/StompMessageTransformation.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/StompMessageTransformation.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/StompMessageTransformation.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/StompMessageTransformation.cs Wed Sep 1 21:55:58 2010 @@ -23,7 +23,7 @@ namespace Apache.NMS.Stomp { public class StompMessageTransformation : MessageTransformation { - private Connection connection; + private readonly Connection connection; public StompMessageTransformation(Connection connection) : base() { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/ThreadUtil.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/ThreadUtil.cs?rev=991722&r1=991721&r2=991722&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/ThreadUtil.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Util/ThreadUtil.cs Wed Sep 1 21:55:58 2010 @@ -15,7 +15,6 @@ * limitations under the License. */ -using System; using System.Threading; namespace Apache.NMS.Stomp.Util