fix StringIndexOutOfBoundsException when tag is not provided

This commit is contained in:
Wanny
2015-03-23 15:29:39 -07:00
parent 823ac04abb
commit 31e8d58b1d

View File

@@ -376,7 +376,10 @@ public class DefaultCodegen {
}
public String initialCaps(String name) {
return Character.toUpperCase(name.charAt(0)) + name.substring(1);
if (name.length()>0)
return Character.toUpperCase(name.charAt(0)) + name.substring(1);
else
return name;
}
public String getTypeDeclaration(String name) {