mirror of https://github.com/apache/poi.git
fix deprecation issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1890785 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b7aa11852e
commit
678446554c
|
@ -233,7 +233,7 @@ public final class CellUtil {
|
|||
public static void setFont(Cell cell, Font font) {
|
||||
// Check if font belongs to workbook
|
||||
Workbook wb = cell.getSheet().getWorkbook();
|
||||
final int fontIndex = font.getIndexAsInt();
|
||||
final int fontIndex = font.getIndex();
|
||||
if (!wb.getFontAt(fontIndex).equals(font)) {
|
||||
throw new IllegalArgumentException("Font does not belong to this workbook");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue