remove unchecked cast from setHyperlink

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1891761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-07-24 07:08:39 +00:00
parent a6b9f5c006
commit b08696f701
1 changed files with 6 additions and 1 deletions

View File

@ -1114,7 +1114,12 @@ public class HSSFCell extends CellBase {
return;
}
HSSFHyperlink link = (HSSFHyperlink)hyperlink;
HSSFHyperlink link;
if (hyperlink instanceof HSSFHyperlink) {
link = (HSSFHyperlink)hyperlink;
} else {
link = new HSSFHyperlink(hyperlink);
}
link.setFirstRow(_record.getRow());
link.setLastRow(_record.getRow());