From 678446554cb07d260baac49f3d0474fe219960f4 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 14 Jun 2021 21:56:46 +0000 Subject: [PATCH] fix deprecation issue git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1890785 13f79535-47bb-0310-9956-ffa450edef68 --- poi/src/main/java/org/apache/poi/ss/util/CellUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1a7c4aaf65..438044b7d0 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 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"); } -- 2.39.5