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");
         }