You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/11/21 23:46:42 UTC
svn commit: r1204737 -
/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
Author: tabish
Date: Mon Nov 21 22:46:42 2011
New Revision: 1204737
URL: http://svn.apache.org/viewvc?rev=1204737&view=rev
Log:
Fix for possible NPE in generated code.
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java?rev=1204737&r1=1204736&r2=1204737&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java Mon Nov 21 22:46:42 2011
@@ -222,7 +222,7 @@ public class CommandClassGenerator exten
String name = property.getSimpleName();
if( property.getType().isArrayType() && toCSharpType(property.getType()).startsWith("byte")) {
- out.print(" \"" + name + " = \" + System.Text.ASCIIEncoding.ASCII.GetString(" + name + ") + ");
+ out.print(" \"" + name + " = \" + " + name + " ?? System.Text.ASCIIEncoding.ASCII.GetString(" + name + ") + ");
} else {
out.print(" \"" + name + " = \" + " + name + " + ");
}