activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1646078 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x: ./ src/main/csharp/OpenWire/BaseDataStreamMarshaller.cs src/test/csharp/OpenWire/BaseDataStreamMarshallerTest.cs
Date Tue, 16 Dec 2014 21:10:09 GMT
Author: tabish
Date: Tue Dec 16 21:10:09 2014
New Revision: 1646078

URL: http://svn.apache.org/r1646078
Log:
https://issues.apache.org/jira/browse/AMQNET-495

Read compacted long values as unsigned.

Added:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/test/csharp/OpenWire/BaseDataStreamMarshallerTest.cs
      - copied unchanged from r1646075, activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/OpenWire/BaseDataStreamMarshallerTest.cs
Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/OpenWire/BaseDataStreamMarshaller.cs

Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 16 21:10:09 2014
@@ -1,4 +1,4 @@
 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782
 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525
 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183
-/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1528583-1528606,1529024-1529281,1530315-1530316,1530371-1530698,1530805,1532353-1532521,1536717,1536764,1537089,1537094,1538073-1541943,1541956,1550241,1560463,1608885,1611115,1611168,1611182,1617335,1617525,1619590-1619593,1621142,1621318
+/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1528583-1528606,1529024-1529281,1530315-1530316,1530371-1530698,1530805,1532353-1532521,1536717,1536764,1537089,1537094,1538073-1541943,1541956,1550241,1560463,1608885,1611115,1611168,1611182,1617335,1617525,1619590-1619593,1621142,1621318,1646075

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/OpenWire/BaseDataStreamMarshaller.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/OpenWire/BaseDataStreamMarshaller.cs?rev=1646078&r1=1646077&r2=1646078&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/OpenWire/BaseDataStreamMarshaller.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/OpenWire/BaseDataStreamMarshaller.cs
Tue Dec 16 21:10:09 2014
@@ -28,7 +28,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
     /// </summary>
     public abstract class BaseDataStreamMarshaller
     {
-        
         private static readonly String[] HEX_TABLE = new String[]{
             "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c",
"0d", "0e", "0f",
             "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c",
"1d", "1e", "1f",
@@ -55,6 +54,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire
         {
             return 0;
         }
+
         public virtual void TightMarshal2(
             OpenWireFormat wireFormat,
             Object o,
@@ -70,8 +70,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             BooleanStream bs)
         {
         }
-        
-        
+
         protected virtual DataStructure TightUnmarshalNestedObject(
             OpenWireFormat wireFormat,
             BinaryReader dataIn,
@@ -262,6 +261,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire
                 }
             }
         }
+
         public virtual long TightUnmarshalLong(OpenWireFormat wireFormat, BinaryReader dataIn,
BooleanStream bs)
         {
             if (bs.ReadBoolean())
@@ -272,14 +272,14 @@ namespace Apache.NMS.ActiveMQ.OpenWire
                 }
                 else
                 {
-                    return dataIn.ReadInt32();
+                    return dataIn.ReadUInt32();
                 }
             }
             else
             {
                 if (bs.ReadBoolean())
                 {
-                    return dataIn.ReadInt16();
+                    return dataIn.ReadUInt16();
                 }
                 else
                 {
@@ -287,6 +287,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire
                 }
             }
         }
+
         protected virtual int TightMarshalObjectArray1(
             OpenWireFormat wireFormat,
             DataStructure[] objects,
@@ -326,7 +327,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             }
         }
         
-        
         protected virtual BrokerError TightUnmarshalBrokerError(
             OpenWireFormat wireFormat,
             BinaryReader dataIn,
@@ -422,7 +422,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             }
         }
 
-        
         public virtual void LooseMarshal(
             OpenWireFormat wireFormat,
             Object o,
@@ -437,7 +436,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
         {
         }
         
-        
         protected virtual DataStructure LooseUnmarshalNestedObject(
             OpenWireFormat wireFormat,
             BinaryReader dataIn)
@@ -457,48 +455,17 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             OpenWireFormat wireFormat,
             BinaryReader dataIn)
         {
-            /*
-             if (wireFormat.isCacheEnabled()) {
-             if (bs.ReadBoolean()) {
-             short index = dataIndataIn.ReadInt16()Int16();
-             DataStructure value = wireFormat.UnmarshalNestedObject(dataIn, bs);
-             wireFormat.setInUnmarshallCache(index, value);
-             return value;
-             } else {
-             short index = dataIn.ReadInt16();
-             return wireFormat.getFromUnmarshallCache(index);
-             }
-             } else {
-             return wireFormat.UnmarshalNestedObject(dataIn, bs);
-             }
-             */
             return wireFormat.LooseUnmarshalNestedObject(dataIn);
         }
-        
-        
+
         protected virtual void LooseMarshalCachedObject(
             OpenWireFormat wireFormat,
             DataStructure o,
             BinaryWriter dataOut)
         {
-            /*
-             if (wireFormat.isCacheEnabled()) {
-             Short index = wireFormat.getMarshallCacheIndex(o);
-             if (bs.ReadBoolean()) {
-             dataOut.Write(index.shortValue(), dataOut);
-             wireFormat.Marshal2NestedObject(o, dataOut, bs);
-             } else {
-             dataOut.Write(index.shortValue(), dataOut);
-             }
-             } else {
-             wireFormat.Marshal2NestedObject(o, dataOut, bs);
-             }
-             */
             wireFormat.LooseMarshalNestedObject(o, dataOut);
         }
-        
-        
-        
+
         protected virtual String LooseUnmarshalString(BinaryReader dataIn)
         {
             if (dataIn.ReadBoolean())
@@ -510,8 +477,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire
                 return null;
             }
         }
-        
-        
+
         public static void LooseMarshalString(String value, BinaryWriter dataOut)
         {
             dataOut.Write(value != null);
@@ -655,8 +621,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             return new String(text);
         }
         
-        
-                
         /// <summary>
         /// Converts the object to a String
         /// </summary>
@@ -664,6 +628,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire
         {
             return ToString(id.ProducerId) + ":" + id.ProducerSequenceId;
         }
+
         /// <summary>
         /// Converts the object to a String
         /// </summary>
@@ -672,7 +637,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             return id.ConnectionId + ":" + id.SessionId + ":" + id.Value;
         }
         
-        
         /// <summary>
         /// Converts the given transaction ID into a String
         /// </summary>
@@ -703,7 +667,6 @@ namespace Apache.NMS.ActiveMQ.OpenWire
             }
             return buffer.ToString();
         }
-        
     }
 }
 



Mime
View raw message