diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java index e4a7e37d70..4d4ad500eb 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -921,16 +921,15 @@ public class HSSFCell implements Cell * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#createCellStyle() * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#getCellStyleAt(short) */ - - public void setCellStyle(CellStyle style) - { - HSSFCellStyle hStyle = (HSSFCellStyle)style; - + public void setCellStyle(CellStyle style) { + setCellStyle( (HSSFCellStyle)style ); + } + public void setCellStyle(HSSFCellStyle style) { // Verify it really does belong to our workbook - hStyle.verifyBelongsToWorkbook(book); + style.verifyBelongsToWorkbook(book); // Change our cell record to use this style - record.setXFIndex(hStyle.getIndex()); + record.setXFIndex(style.getIndex()); } /**