commit | 558fc0dbc5eaba8088073c317317f6952456f8c7 | [log] [tgz] |
---|---|---|
author | Timothy A. Bish <tabish@apache.org> | Mon Nov 21 22:46:42 2011 +0000 |
committer | Timothy A. Bish <tabish@apache.org> | Mon Nov 21 22:46:42 2011 +0000 |
tree | 8142505681d22a93ffec267fc68bf0e2c8447e79 | |
parent | 2070215d21384fbd4e3092eb6d5cb6969f60501f [diff] |
Fix for possible NPE in generated code.
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 @@ 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 + " + "); }