activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r1238881 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x: src/main/csharp/Commands/ActiveMQBytesMessage.cs vs2008-activemq-test.csproj
Date Wed, 01 Feb 2012 00:35:17 GMT
Author: jgomes
Date: Wed Feb  1 00:35:17 2012
New Revision: 1238881

URL: http://svn.apache.org/viewvc?rev=1238881&view=rev
Log:
Add null checks when assigning BytesMessage content.
Remove deleted file reference from the test project file.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/src/main/csharp/Commands/ActiveMQBytesMessage.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/vs2008-activemq-test.csproj

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/src/main/csharp/Commands/ActiveMQBytesMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/src/main/csharp/Commands/ActiveMQBytesMessage.cs?rev=1238881&r1=1238880&r2=1238881&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/src/main/csharp/Commands/ActiveMQBytesMessage.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/src/main/csharp/Commands/ActiveMQBytesMessage.cs
Wed Feb  1 00:35:17 2012
@@ -463,7 +463,10 @@ namespace Apache.NMS.ActiveMQ.Commands
             set
             {
                 InitializeWriting();
-                this.dataOut.Write(value, 0, value.Length);
+				if(null != value)
+				{
+					this.dataOut.Write(value, 0, value.Length);
+				}
             }
         }
 
@@ -537,10 +540,13 @@ namespace Apache.NMS.ActiveMQ.Commands
                     EndianBinaryWriter writer = new EndianBinaryWriter(final);          
         
 
                     this.dataOut.Close();
-                    byte[] compressed = this.outputBuffer.ToArray();
 
                     writer.Write(this.length);
-                    writer.Write(compressed, 0, compressed.Length);
+					if(this.length > 0)
+					{
+						byte[] compressed = this.outputBuffer.ToArray();
+						writer.Write(compressed, 0, compressed.Length);
+					}
                     writer.Close();
                     
                     base.Content = final.ToArray();
@@ -623,8 +629,11 @@ namespace Apache.NMS.ActiveMQ.Commands
             
             public override void Write(byte[] buffer, int offset, int count)
             {
-                this.parent.length += count;
-                this.sink.Write(buffer, offset, count);
+				if(null != buffer)
+				{
+					this.parent.length += count;
+					this.sink.Write(buffer, offset, count);
+				}
             }
 
             public override void Flush()

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/vs2008-activemq-test.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/vs2008-activemq-test.csproj?rev=1238881&r1=1238880&r2=1238881&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/vs2008-activemq-test.csproj
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x/vs2008-activemq-test.csproj
Wed Feb  1 00:35:17 2012
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.21022</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{EB943C69-2C9B-45E7-B95B-FB916E7057ED}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -105,7 +105,6 @@
     <Compile Include="src\test\csharp\Transactions\RecoveryFileLoggerTest.cs" />
     <Compile Include="src\test\csharp\Transactions\RecoveryLoggerHarness.cs" />
     <Compile Include="src\test\csharp\Transactions\RecoveryLoggerHarnessFactory.cs" />
-    <Compile Include="src\test\csharp\Transport\failover\FailoverTransactionTest.cs" />
     <Compile Include="src\test\csharp\Transport\failover\FailoverTransportTest.cs" />
     <Compile Include="src\test\csharp\Transport\Inactivity\InactivityMonitorTest.cs" />
     <Compile Include="src\test\csharp\Transport\Mock\MockTransportFactoryTest.cs" />



Mime
View raw message