Add check for list size before attempting to set last element field value. (#557)

This commit is contained in:
jason-cohen 2018-07-13 11:42:14 -04:00 committed by William Cheng
parent 26e70fe642
commit cd854b2130

View File

@ -576,7 +576,9 @@ public class SpringCodegen extends AbstractJavaCodegen
allParams.add(p);
}
}
allParams.get(allParams.size()-1).hasMore =false;
if (!allParams.isEmpty()) {
allParams.get(allParams.size()-1).hasMore =false;
}
}
@Override