From fe3e5a4ccd87af9e7dfcec310826353a86000a8d Mon Sep 17 00:00:00 2001 From: Thomas Bombach Date: Thu, 12 May 2016 10:47:46 -0700 Subject: [PATCH] Fix for a null reference exception in JavaCodeNamer when the namespace parameter is not provided as a command line parameter --- AutoRest/Generators/Java/Java/JavaCodeNamer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoRest/Generators/Java/Java/JavaCodeNamer.cs b/AutoRest/Generators/Java/Java/JavaCodeNamer.cs index c8d58b1031..3c4921479f 100644 --- a/AutoRest/Generators/Java/Java/JavaCodeNamer.cs +++ b/AutoRest/Generators/Java/Java/JavaCodeNamer.cs @@ -33,7 +33,7 @@ public JavaCodeNamer(string nameSpace) { // List retrieved from // http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html - _package = nameSpace.ToLower(CultureInfo.InvariantCulture); + _package = nameSpace != null ? nameSpace.ToLower(CultureInfo.InvariantCulture) : string.Empty; new HashSet { "abstract", "assert", "boolean", "break", "byte",