throw exception when the maximum number of fonts was exceeded
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@592520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
65f468498a
commit
44041860e3
@ -802,6 +802,9 @@ public class HSSFWorkbook extends POIDocument
|
||||
{
|
||||
fontindex++; // THERE IS NO FOUR!!
|
||||
}
|
||||
if(fontindex == Short.MAX_VALUE){
|
||||
throw new IllegalArgumentException("Maximum number of fonts was exceeded");
|
||||
}
|
||||
HSSFFont retval = new HSSFFont(fontindex, font);
|
||||
|
||||
return retval;
|
||||
|
Loading…
Reference in New Issue
Block a user