commit | 678446554cb07d260baac49f3d0474fe219960f4 | [log] [tgz] |
---|---|---|
author | PJ Fanning <fanningpj@apache.org> | Mon Jun 14 21:56:46 2021 +0000 |
committer | PJ Fanning <fanningpj@apache.org> | Mon Jun 14 21:56:46 2021 +0000 |
tree | 867d0134e55ece5a0b061217b22a5515758067fc | |
parent | b7aa11852edae94ccf83d842277d56f8a119b341 [diff] |
fix deprecation issue git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1890785 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java index 1a7c4aa..438044b 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
@@ -233,7 +233,7 @@ 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"); }