Added isEmtyString check to avoid IndexOutOfBoundException

This commit is contained in:
wwn 2016-11-02 18:45:25 +01:00
parent 8fb33980dc
commit 8eefe863bf

View File

@ -2947,7 +2947,7 @@ public class DefaultCodegen {
m = p.matcher(word); m = p.matcher(word);
} }
if (lowercaseFirstLetter) { if (lowercaseFirstLetter && word.length() > 0) {
word = word.substring(0, 1).toLowerCase() + word.substring(1); word = word.substring(0, 1).toLowerCase() + word.substring(1);
} }