This is an automated email from the ASF dual-hosted git repository. dfoulks pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-nms-openwire-generator.git
commit 558fc0dbc5eaba8088073c317317f6952456f8c7 Author: Timothy A. Bish <[email protected]> AuthorDate: Mon Nov 21 22:46:42 2011 +0000 Fix for possible NPE in generated code. --- .../activemq/nms/openwire/tool/commands/CommandClassGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java index ac04e97..bad5901 100644 --- a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java +++ b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java @@ -222,7 +222,7 @@ public class CommandClassGenerator extends CommandCodeGenerator { 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 + " + "); }
