Author: tabish
Date: Fri Sep 3 20:58:47 2010
New Revision: 992465
URL: http://svn.apache.org/viewvc?rev=992465&view=rev
Log:
fix for: https://issues.apache.org/activemq/browse/AMQNET-280
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/PrimitiveMapInterceptor.cs
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/PrimitiveMapInterceptor.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/PrimitiveMapInterceptor.cs?rev=992465&r1=992464&r2=992465&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/PrimitiveMapInterceptor.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/PrimitiveMapInterceptor.cs
Fri Sep 3 20:58:47 2010
@@ -227,10 +227,16 @@ namespace Apache.NMS.Util
{
return (char) value;
}
- else
- {
- throw new MessageFormatException(" cannot read a char from
" + value.GetType().Name);
- }
+ else if(value is String)
+ {
+ string svalue = value as string;
+ if(svalue.Length == 1)
+ {
+ return svalue.ToCharArray()[0];
+ }
+ }
+
+ throw new MessageFormatException(" cannot read
a char from " + value.GetType().Name);
}
catch(FormatException ex)
{